scheduled-tasks

How can I schedule a 'weekly' job on Heroku?

雨燕双飞 提交于 2019-12-31 09:13:50
问题 I have a Rails app deployed on Heroku with the Heroku scheduler add-on successfully working for daily jobs. Now I want a weekly job , but the scheduler add-on does not allow me a weekly option. Any suggestions on how I could accomplish this: I've tried using rufus-scheduler in the past but it caused me some problems, so that's not an option. See here for detail. I'm thinking of something along the lines of checking for current day within a daily job. Has anyone tried it and have feedback or

schedule ant task

萝らか妹 提交于 2019-12-31 06:28:08
问题 Is it possible "and how if you know", to schedule the execution of an ant task? For example, i want my build.xml to be executed every 5 hours or every day at a certain time? I have been looking around but no solution found Thank you 回答1: For very simple requirements, I'd echo the use of cron. If the reason for running ANT is to periodically perform a master build of your project's code, then you're effectively following a practice called "Continuous Integration". In that case I'd highly

Check something at regular intervals in a Python (Qt) application

只愿长相守 提交于 2019-12-31 04:10:54
问题 I'm writing a GUI application using Python and Qt as a GUI library. I would like to perform certain scheduled actions after e.g. 3 days or so (but some more often, some even more rare etc). I have discovered the QTimer() app but my understanding is that it only tracks time while the software is running. So, for example, suppose a user has checked the option to check the automatic updates every 5 days. If he runs it on day one, everything is fine. The countdown clock starts ticking. But if he

Scheduled Task for PowerShell Script with String Array Parameter

家住魔仙堡 提交于 2019-12-31 01:54:13
问题 I've created a PowerShell script that runs perfectly from the Management Shell. I'm trying to get it setup to work in a scheduled task in Windows Server 2008 R2 and am unsure how to pass the parameters for my string array parameter. Here is the relevant portion of my script: [CmdletBinding()] param( [Parameter(Mandatory=$true)] [String] $BaseDirectory, [String] $BackupMethod = "Full", [Int] $RemoveOlderThanDays = 0, [String] $LogDirectory, [Int] $LogKeepDays = 7, [String[]]

Laravel 5 schedule job every 30 seconds

青春壹個敷衍的年華 提交于 2019-12-30 13:41:57
问题 I am using Laravel schedule to run cron jobs. In my crontab I have added (with correct path to my project): * * * * * php /path/to/artisan schedule:run >> /dev/null 2>&1 Now my App\Console\Kernel.php looks like: protected function schedule(Schedule $schedule) { $schedule->command('investments:calculate_interests')->everyMinute(); $schedule->call('\App\Http\Controllers\UsersController@testEvent')->everyMinute(); } Using it like that I successfully run jobs every minute. But how I can change it

Laravel 5 schedule job every 30 seconds

て烟熏妆下的殇ゞ 提交于 2019-12-30 13:41:30
问题 I am using Laravel schedule to run cron jobs. In my crontab I have added (with correct path to my project): * * * * * php /path/to/artisan schedule:run >> /dev/null 2>&1 Now my App\Console\Kernel.php looks like: protected function schedule(Schedule $schedule) { $schedule->command('investments:calculate_interests')->everyMinute(); $schedule->call('\App\Http\Controllers\UsersController@testEvent')->everyMinute(); } Using it like that I successfully run jobs every minute. But how I can change it

Scheduling tasks with rails

心不动则不痛 提交于 2019-12-30 13:29:20
问题 I have been going over rails scheduling tasks options and stumbled upon this piece of code from whenever. case @environment when 'production' every 1.day, :at => "#{Time.parse('12:00 A').getlocal.strftime("%H:%M")}" do runner "Company.send_later(:create_daily_stories!)" end when 'staging' every 15.minutes do command "thinking_sphinx_searchd reindex" end end I am fairly new to ruby and I dont quite understand what "Company" here stands for. In other words say i want to send an email out to

.NET create scheduled task on server fails with E_ACCESSDENIED

不打扰是莪最后的温柔 提交于 2019-12-30 07:11:38
问题 I have an ASP.NET website (in C#) that takes in user data and then attempts to create a windows scheduled task. Of course, this works great on the DEV machine, but fails to run on the server. I'm trying to figure out what permission(s) are required on the ASPNET user (or anonymous web user) to create tasks. The error is: Access is denied. (Exception from HRESULT: 0x80070005 (E_ACCESSDENIED)) Stacktrace: at MyScheduler.NewWorkItem(String TaskName, Guid& rclsid, Guid& riid, Object& obj) at

C# - Windows Service with awareness of System Time

我的未来我决定 提交于 2019-12-30 06:18:12
问题 I am thinking about writing a windows service that will turn a certain functionality on or off at times specified by the user (using a configuration utility I will provide). Basically, the user would specify certain times that the PC would go into "work-only" mode (blocking Facebook and other distracting sites), and then when those times are up the PC will return to normal mode. I have already come up with a few ways to create the "work-only" mode, but what I am struggling with is how to know

Periodic execution of particular code in c#

心不动则不痛 提交于 2019-12-29 09:26:09
问题 I've a set of queries which I want to execute only once in day, I know this is possible using TaskScheduler in C#. But I am not getting any example suitable for my requirements. Can anybody give a example code for this? 回答1: You can try FluentScheduler . The documentation has the sample codes all you need. Firstly I thought it is for web only, but now I think you can use it for using with Desktop Application too. But not sure and not tested. https://fluentscheduler.codeplex.com/documentation