Scheduling Tasks in Windows 7
Windows 7 make many things simpler, and one of them is the Task Scheduler feature. Task Scheduler help to perform automation of tasks that can run on regular/schedule intervals.Either on daily or weekly or on a monthly basis. Task Scheduler help to perform automation of tasks that can run on regular/schedule intervals. Either on daily or weekly or on a monthly basis.
Using it, we can operate a program, send an email/display a message. One thing I managed to perform in my dev system regularly is manually restarting ColdFusion server on a daily basis with this batch script.
@echo off
echo Stopping ColdFusion 9 Services
echo ======================================================
net stop "ColdFusion 9 Application Server"
echo Starting ColdFusion 9 Services
echo ======================================================
net start "ColdFusion 9 Application Server"
echo ======================================================
echo ColdFusion 9 Services are Started
Let note how we can utilize the Task Scheduler in Windows 7 to automate this process.
To Launch the Task Scheduler go to Control Panel > Administrative Tools > Task Scheduler or just type “Task” on the Windows menu search.
Create a Basic Task and follow the steps which ask for when and what time you want to trigger a job (Email, Program etc.) the remaining steps are self-explanatory.
To execute the above batch file I just mentioned the file location of it in “Start a Program” wizard which triggers my ColdFusion Server restart.
Done. I am certain many of us are utilizing this feature already but if you’re not then don’t wait. This utility undoubtedly reduces our time in performing these types of repetitive works.
Comments
It's better but still not as reliable as cron. :) I still occasionally get inconsistent results. 99% of the time the tasks run but there is that 1% when things don't fire which always troubles me.
Completely Agree and Cron is the best for scheduling things but Windows 7 Schedule task is 100% better when comparing to Windows XP.
I prefer VisualCron, http://www.visualcron.com, for scheduling. You can do many things that cannot be done in the built in scheduler. Like calling web services and methods in assemblies.
(Comments migrated from previous blog engine.)