How To Run Linux Style Cron Jobs on Windows

Varun Kashyap 07-02-2009

cron job windowsEver wanted to connect/disconnect the Internet connection at particular times? Want to perform disk defragmentation on weekends when you are not working on your computer? Want to perform backups on 27th of each month?


If you ever wondered how you could achieve that Linux style cron jobs on Windows and tried using the Windows task scheduler you have probably given up hope and have multiple entries to run the same task. On the other hand if you have used the Linux Cron utility you’ll know the power it offers. Bringing similar powers and options to Windows is Z-Cron.


You can download Z-Cron for free here. The download is a zip file, extract and run the setup.

How to Use

Once Z-Cron has been set up, you can begin scheduling tasks with great power and ease. Lets say you keep all your torrent files in one directory and you want to be able to load all the torrent files in that directory in your torrent client for downloading, automatically at 2am on Saturdays and Tuesdays (for whatever reason, here in India we have some broadband plans where data transfer doesn’t count towards the bandwidth cap between 2 am – 8 am, so you can use the following example and change it according to your needs).

Let’s walk through the process:

1. I am using µtorrent in this example.  If you use any other torrent client you would have to find the command line options/parameters for your client. For µtorrent it is


µtorrent.exe /directory “<torrent save path>” “<path to torrent file>”

2. Since we want to add all the torrents in a particular directory to the download queue you would have to create a batch file. I won’t get into the details here but here is what you add to the batch file (I am looping through all torrent files and adding them to µtorrent):

cd c:\Torrents
FOR %%X IN (*.torrent) DO “C:\Program Files\µtorrent\µtorrent.exe” /directory “D:\Torrent_Downloads” c:\Torrents\%%X

Where C:\Torrents is where I would store .torrent files and D:\Torrent_Downloads is where I want the downloads to be stored. Be careful while using spaces in names of folders or files, it may break the batch file code.


3. Save this file as torrents.bat

4. Start Z-Cron, Click on task (this allows you to create/edit existing tasks)

cron on windows xp

5. This should open up the Job Settings Window like below. In here you can choose the program/batch file/commands to run and pass arguments to them. Since we already created a batch file in steps 1,2 and 3 we will choose that file here, name our task and provide some description.


cron job windows

6. Click on the scheduler tab and this is where you get the control over scheduling that you can’t even imagine to get with the default Windows Task Scheduler. The screen looks like this:

How To Run Linux Style Cron Jobs on Windows scheduler

You can choose to schedule tasks by weeks or months. Check the Weekday under “Period” and you will get the weekly scheduler. Check Tuesday and Saturday.


If however you want greater control you can schedule for specific dates by choosing “Month” as period, which makes it look like this:

How To Run Linux Style Cron Jobs on Windows scheduler month

You can now do things like making the task run on 27th of every month, last Week of every month, or all Tuesdays of every month, or simply run on 27th February or any other day.

7. So far so good, we have chosen the days we want the task to run, now for the time. Click on scheduler button to bring up a screen like the following:

How To Run Linux Style Cron Jobs on Windows newschedule

Hover over the check boxes and see the time change at the bottom, check the appropriate check box, you can select multiple checkboxes to run the task repeatedly.

8. For our torrent download example the screens look like this (remember we want to run it at 2 am on Saturdays and Tuesdays)

How To Run Linux Style Cron Jobs on Windows torrent1
How To Run Linux Style Cron Jobs on Windows newschedule

That’s it we have scheduled the task to run at 2 am on Tuesdays and Saturdays (notice the calendar on right hand side).

In addition to the control you get in scheduling tasks, you can also use Z-Cron’s built in commands to dial up your connection, move files/ directories, sound alarms, kill processes, monitor programs and many more things effectively removing tedious steps 1, 2 and 3. However if you need something custom, like the example above, you will have hack around a bit!


So how do you like Z-Cron? Do you know of other similar utilities for Windows? Can you think of more constructive ways to use Z-Cron? Share with us in the comments!

Affiliate Disclosure: By buying the products we recommend, you help keep the site alive. Read more.

Whatsapp Pinterest

Leave a Reply

Your email address will not be published. Required fields are marked *

  1. Peter
    February 9, 2009 at 11:14 am

    ... or you could use the built-in task scheduler of Windows...

    • Maurice
      September 1, 2016 at 5:11 pm

      Now, a simpler solution, you might consider a cron services like easycron which will load a specific URL at a given time.

  2. lainwired
    February 8, 2009 at 11:53 pm

    Wow. nice tip. i need to check out hat z-cron

  3. Alvin Finn
    February 8, 2009 at 12:59 pm

    I've been using nnCron for many years and it's always been flawless. Unlike Z-Cron, nnCron has no GUI as it uses the standard unix crontab format. I think this is actually easier because once you take a few minutes to understand the crontab format, setting up a new job is trivial. I don't know about the memory footprint of Z-Cron, but nnCron is extremely lightweight and stable.

  4. BobCFC
    February 7, 2009 at 9:37 pm

    Cron is so powerful. Many times I want to go to bed at 4am but I have a download that still has 15mins to go so I just type something like

    sudo halt 4:30

    And I can goto sleep knowing that my system will shut itself down.