scheduled-tasks

Powershell v4. Create remote task scheduler task set to expire and delete

爱⌒轻易说出口 提交于 2019-12-29 09:17:10
问题 I am trying to create a task that essentially reboots the server but the task is put there by a remote server running a check to see if a reboot is needed. I am stuck trying to add an expiration so it deletes itself but can't find where to put that setting or what it is. It has to do with an end boundry or something and this setting -DeleteExpiredTaskAfter but don't know what value to put in. $dc = "server2reboot" $taskname = "Reboot $DC" $taskpath = "PendingReboots" $CimSession = New

laravel cannot run scheduled command, while queue:listen run schedule() periodically

∥☆過路亽.° 提交于 2019-12-29 08:25:11
问题 Note: My question has nothing to do with Command schedule in Laravel which schedule not work. But in my question the scheduling works, but it cannot call the artisan command. I use laravel scheduling artisan command. I run the command directly from the console like this sudo -u www-data /var/www/market/artisan command:printer-serving 281H28 . I know it works because, I've Log::info('Working') at the entry of the handle() function of the command. While when I use laravel's scheduling. And the

Run a PHP script once every minute

百般思念 提交于 2019-12-29 07:44:34
问题 I need to execute my PHP code every minute. Is there any way to do that? 回答1: You can run PHP code from the command line. e.g., if your PHP folder is in PATH: php.exe C:\mycode\myfile.php You can then set this up as a scheduled task in windows. Side note: be aware that certain things don't exist (and something exist in their place), e.g. Apache or IIS objects, as well as the full range of HTTP stuff. 回答2: Set up a cron job. 回答3: If you don't want to use cron; you could write a script to call

Scheduled Tasks with Sql Azure?

穿精又带淫゛_ 提交于 2019-12-29 07:42:21
问题 I wonder if there's a way to use scheduled tasks with SQL Azure? Every help is appreciated. The point is, that I want to run a simple, single line statement every day and would like to prevent setting up a worker role. 回答1: There's no SQL Agent equivalent for SQL Azure today. You'd have to call your single-line statement from a background task. However, if you have a Web Role already, you can easily spawn a thread to handle this in your web role without having to create a Worker Role. I

What is the best method for scheduled tasks in PHP

泄露秘密 提交于 2019-12-27 22:36:24
问题 Title sums it up, I know little about how I will do this. See also: PHP: running scheduled jobs (cron jobs) 回答1: Have you ever looked at ATrigger? A PHP library is also available to create scheduled tasks without overhead. Disclaimer: I'm among their team. 回答2: The best method for scheduled tasks is beanstalkd with delayed put. 回答3: Use your operating system's scheduled tasks facility. crontab on unix, scheduled tasks on windows. Then we have some more considerations: Do you want to schedule

Schedule a repeating event in Python 3

匆匆过客 提交于 2019-12-27 17:00:42
问题 I'm trying to schedule a repeating event to run every minute in Python 3. I've seen class sched.scheduler but I'm wondering if there's another way to do it. I've heard mentions I could use multiple threads for this, which I wouldn't mind doing. I'm basically requesting some JSON and then parsing it; its value changes over time. To use sched.scheduler I have to create a loop to request it to schedule the even to run for one hour: scheduler = sched.scheduler(time.time, time.sleep) # Schedule

How to schedule a task using win32_schedule job class

喜夏-厌秋 提交于 2019-12-25 18:32:30
问题 I've to create a class which schedules a task to run at specified time. I know it can be achieved by win32_schedule class create method. Can someone please help me in creating a task which opens at a specified date and time?(Code Sample). Help me with the start time parameter(conversions and all) 回答1: It's not a code sample, but it can help you: http://social.msdn.microsoft.com/Forums/vstudio/en-US/022e4429-56bc-482c-9a67-af484d6978c1/using-windows-scheduled-tasks-in-c?forum=csharpgeneral 来源:

App is invisible if started from Task Scheduler without any user logged in

前提是你 提交于 2019-12-25 12:37:16
问题 Is there any way to have app visible even if it is started with "Run only if user logged on" unchecked? I know that windows starts app from task invisible as there is no user logged into yet. But when user logs in he would like to see that app instead of running in the background. I would like to know the way to solve it. There must be a lot of people who faced this problem before. Thanks, 回答1: It sounds to me like your application was not architectured correctly for the operating system

Python periodic task inside an infinite loop

人走茶凉 提交于 2019-12-25 11:45:30
问题 I need to execute a piece of code inside a while True loop every, let's say, 5 seconds. I know the threading.Timer(5, foo).start() will be run every 5 seconds but my foo() function depends on a variable inside my while loop. The foo is actually run on another thread and I don't want to block the current thread just for timing's sake. +------------------------while #main-thread--------------------------------- | +..........foo(val)..........foo(val)...........foo(val)............foo(val) -5s-

.NET Scheduling many operations: single timer vs one timer for operation

ε祈祈猫儿з 提交于 2019-12-25 09:43:17
问题 I am developing a Windows Service application, in .NET, which executes many functions (it is a WCF service host), and one of the targets is running scheduled tasks. I chose to create a System.Threading.Timer for every operation, with a dueTime set to the next execution and no period to avoid reentrancy. Every time the operation ends, it changes the dueTime to match the next scheduled execution. Most of the operations are scheduled to run every minute, not all toghether but delayed by some