Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 860
  • Last Modified:

DOS batch file has to run hourly, except on weekends.

I need to run a DOS batch file hourly, except on weekends.  I think I can use the DOS SLEEP command to run it hourly (SLEEP 3600), but this isn't a very elegant solution and it doesn't stop on the weekends.  I could always stop it manually, but can anyone suggest a better way to approach this problem?  By the way, the batch file has to pull some information from a database and ftp it to another site.  My OS is XP Pro. Thanks for your input!
1 Solution
I recommend using the Windows Task Scheduler.

In the Control Panel go to Schedule Tasks.  Then select Add a Scheduled Task.

Follow the wizard and select browse to select the dos batch file.  Then select perform task weekly and select the days to run.  Follow the prompts to then end and select Open Advance Properties.

In Advance Properties, click the Schedule tab.  Click the Advanced button.  In here select the Repeat task option and schedule it for every hour.  Let me know if you have questions.
tedsiniAuthor Commented:
Thanks,  I knew about the Scheduler but I thought it was limited to daily tasks.  I hadn't opened the "Advanced Properties"  tab.  The file works hourly now, as needed.

Featured Post

[Webinar On Demand] Database Backup and Recovery

Does your company store data on premises, off site, in the cloud, or a combination of these? If you answered “yes”, you need a data backup recovery plan that fits each and every platform. Watch now as as Percona teaches us how to build agile data backup recovery plan.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now