Akbarsait's Blog

Scheduling Tasks in Windows 7

Windows 7 makes many things simpler and one of them which I would really like is the Task Scheduler feature. Task Scheduler in Windows 7 helps you to perform automation of tasks which can be run on regular intervals or can be schedule to run Daily, Weekly or on the Monthly basis.

Using Task Scheduler in Windows 7 we can start a program, Send an Email or display a message. One thing I used 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 see 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.

Scheduling Tasks in Windows 7

That's it we have done scheduling it and 'm sure many of us are using this feature already but if you're not then don't wait it's really saves our time in doing these types of repetitive works.



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.
# Posted By Jim Priest | 7/31/11 10:42 AM
Completely Agree and Cron is the best for scheduling things but Windows 7 Schedule task is 100% better when comparing to Windows XP.
# Posted By Akbarsait | 8/3/11 10:24 AM
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.
# Posted By Mano | 1/21/12 10:09 AM



About Me

ColdFusion Enthusiast, Web Developer and Consultant, Travel, Technology, Android, Xbox, Movies and Music Fan boy. more
Akbarsait's Blog RSS Feed Twitter Google Plus Facebook Twitter Facebook
        My WishList


  ColdFusion 9 Tutorials    MySql Backup and FTP



  


Archives

Aggregated by

 Aggregated by ColdFusionBloggers
 Aggregated by MXNA
 Aggregated by CFBLOGS.COM