scheduled-tasks

How to run a PHP file in a scheduled task (Windows Task Scheduler)

拜拜、爱过 提交于 2019-12-16 22:47:52
问题 How can I create a scheduled task to run a PHP file? Yes, I filled out everything in the scheduled task, but it still doesn't work. Run: "C:\Program Files\Apache Software Foundation\Apache2.2\htdocs\WEB\4w_website\save.php" Start in: "C:\Program Files\Apache Software Foundation\Apache2.2\htdocs\WEB\4w_website" It just opens the PHP file in Notepad. I gave the correct user name and pwd. Please help me.. 回答1: The Run command should be C:\Path\to\php.exe -f "C:\Path\to\file.php" From the command

Running a cron every 30 seconds

孤人 提交于 2019-12-16 20:02:13
问题 Ok so I have a cron that I need to run every 30 seconds. Here is what I have: */30 * * * * /bin/bash -l -c 'cd /srv/last_song/releases/20120308133159 && script/rails runner -e production '\''Song.insert_latest'\''' It runs, but is this running every 30 minutes or 30 seconds? Also, I have been reading that cron might not be the best tool to use if I run it that often. Is there another better tool that I can use or install on Ubuntu 11.04 that will be a better option? Is there a way to fix the

Creating Scheduled Tasks

北战南征 提交于 2019-12-16 19:49:12
问题 I am working on a C# WPF project. I need to allow the user to create and add a scheduled task to the Windows Task Scheduler. How could I go about doing this and what using directives and references do I need as I am not finding much when searching the Internet. 回答1: You can use Task Scheduler Managed Wrapper: using System; using Microsoft.Win32.TaskScheduler; class Program { static void Main(string[] args) { // Get the service on the local machine using (TaskService ts = new TaskService()) {

scheduling task in windows 2008 with powershell

荒凉一梦 提交于 2019-12-16 18:02:52
问题 i want to schedule task in windows 2008 r2 with powershell. i used $username = "BUILTIN\Users" $TaskName = 'kakaka' $t=1 $TaskRun = "$PSHome\powershell.exe Start-Process -FilePath 'C:\v.exe' -ArgumentList '/a' -Verb runas -WindowStyle Normal" $start = (Get-Date).AddMinutes($t).ToString("HH:mm") schtasks /create /ru $username /tn $Taskname /tr $TaskRun /sc once /st $start /f on using above script i got an error "schtasks.exe : ERROR: The task XML contains a value which is incorrectly formatted

How to run a .NET program, automatically, every hour

守給你的承諾、 提交于 2019-12-14 03:57:25
问题 I have xml data I access through a web service. I need to read the data and copy it locally. The below code works fine. I need now to run this code at least twice or three times a day wihout manual intervention. How do I do that? Thanks! using System; using System.Collections; using System.Data; using System.Xml; class MainClass{ public static void Main(){ XmlDocument doc = new XmlDocument(); // read doc.Load(new System.IO.StringReader(GetContracts())); // write XmlTextWriter tw = new

Schedule task for a specific date & time in android

冷暖自知 提交于 2019-12-14 03:24:49
问题 I'm tying to make a app schedules task, for example 28th of april at 5am I need to check a file on my server, for example if there is a Update for the app. But if the user his phone is shutdown at that time the task needs to be executed at the best time possible, next bootup & when the phone is conencted to the internet? I can't figure out how I can do this? I can't find a framework or Classes in the Android API that can do This task in android. Anyone who knows a way to do this and what the

AutoSys Job multiple dependencies issue: s(1) & s(2) & s(3)

◇◆丶佛笑我妖孽 提交于 2019-12-14 03:05:43
问题 I got 4 jobs: 1, 2, 3, 4. 2's condition: s(1); 3's condition: s(2); 4's condition: s(1) & s(2) & s(3) all these jobs are daily jobs the first day is ok. the second day, the 4th job triggered mutilple times : I think when 1 success, and the status of 2 and 3 are still 'success'(the last days status), so the job 4 triggered, then 2 success, triggered again... so is there any solution for this? becase I only want these condition is based on the current day's result. 回答1: This is already answered

schtasks.exe vs ITaskScheduler

假如想象 提交于 2019-12-14 01:30:24
问题 I'm trying to write some code to automatically "configure" a bunch of scheduled tasks on a machine. The program will read an XML file then "configure" the run times etc. of the task based on the information in the XML file. The idea should be that the program can be "run" multiple times on the machine and automatically "add/remove" any effective changes. The way I was wanting to do this was as follows: All tasks will be created with some special "prefix". When the program runs, it "deletes"

Spring : Schedule a task which takes a parameter

大兔子大兔子 提交于 2019-12-14 00:54:23
问题 I have a class with the following function: public class classA{ ... ... void function_to_be_scheduled(String param){ ... ... } } I want to schedule the function using the scheduled-tasks element of the task namespace. <task:scheduled-tasks> <task:scheduled ref="beanA" method="function_to_be_scheduled" cron="${cron}"/> </task:scheduled-tasks> How do i pass the parameter to the function which i want to schedule? 回答1: According to the docs you cant. Notice that the methods to be scheduled must

WebSocketConfigurer and @Scheduled() are not work well in an application

泪湿孤枕 提交于 2019-12-14 00:31:22
问题 I can either use websocket that configure with WebSocketConfigurer or use @Scheduled() to schedule task without any problem. However, java does not compile when i use both of them. @Scheduled() annotation may crash with org.springframework.web.socket.config.annotation.WebSocketConfigurationSupport$NoOpScheduler.scheduleAtFixedRate() java.lang.IllegalStateException: Unexpected use of scheduler. at org.springframework.web.socket.config.annotation.WebSocketConfigurationSupport$NoOpScheduler