How to add a scheduled task that should run every x-minutes on Windows Server 2003 R2.
I have followed many suggestion from the web, but I always end up with some interruption after 1 or 2 runs.
Here is what I did:
New Scheduled Task
Schedule > Daily Task 08:00 AM, every 1 day
Schedule > Advanced > Repeat task every 30 minutes, duration 31 minutes (why???)
Enabled it
Not working after 1 run and the next run time is +1 day at 08:00 AM
How to fix this problem?
It sounds like the task might not be completing successfully, and multiple instances of the task might be trying to run at the same time.
Open up Scheduled Tasks from the Control Panel.
Right click on the task you've created and click "Properties."
Navigate to the "Schedule" tab.
Choose the start time (00:10 AM)
Make sure that Schedule Task Daily is set to Every 1 day(s).
Click Advanced.
Check the "Repeat Task" checkbox.
Until: (select bullet) Time: (enter 11:59 PM) and click "OK"
Open the "Settings" tab now.
[Check] Stop the task if it runs for: [0] hour(s) and [9] minute(s). Click "OK" This will prevent multiple instances of the scheduled task from running at the same time, possibly causing the conflicts you've described.
If the scheduled task is set to run every 30 minutes, set it to stop the task after 29 minutes (in case it hangs for some reason).
If this is the problem you'll want to look at what your task is doing, and see what might be causing it to hang. A successfully executed task will exit with Last Result = 0x0.
You can try this:
This task will run every 10 minutes, the first time is right after you make this command.
Schedule the task in this way:
Duration 31 minutes will cause the task to be repeated only once (so it will be run at 8:00 AM and 8:30 AM).
The duration specifies how long you want to keep repeating the task. Set the duration to 23 hours and 59 minutes and your task will repeat every 30mins for the duration of an entire day. http://support.microsoft.com/kb/814596