Categories: Development

How to make cron jobs from Windows task scheduler

How to create cron jobs on Windows server with the Windows task scheduler.

The first step is to open Windows task scheduler and click Create Task

The first step under the General tab is naming the task:

After you have named your cron job, click the Triggers tab at the top, then New… at the bottom

Here is the cron job timing, In the example below I have this scheduled task (cron job) to run every hour, on the hour.

Make sure Enabled is ticked at the bottom.

Had I put the start time at 12:15:00 PM it would run next at 1:15:00 PM, then 2:15:00 PM etc.

Go across to the Actions tab and click the New button at the bottom

The action is what happens for our scheduled event.

To make a cron job you will need Wget, download it here. I put wget.exe in the C drive, this is the program being referenced. The argument that gets run with Wget is -q -O nul http://127.0.0.1/ourscript.php. -q is quite mode, -O nul means output into “nothing” and http://127.0.0.1/ourscript.php will be the file being called.

You now have made a cron job on Windows server by using Windows task scheduler.

Share

Recent Posts

Kennington reservoir drained drone images

A drained and empty Kennington reservoir images from a drone in early July 2024. The…

2 years ago

Merrimu Reservoir drone images

Merrimu Reservoir from drone. Click images to view larger.

2 years ago

Early September spring shots

Some early September spring shots from a bushwalk, It is still too early for wildflowers.

3 years ago

Cloning an NVMe to SK Hynix Platinum P41 NVMe

I recently needed to clone over a smaller NVMe to a 2TB SK Hynix Platinum…

3 years ago

Using Laravel’s deleteDirectory to delete folders and their contents

If you ever needed a simple solution in Laravel to delete an entire directory and…

3 years ago

How to allow only 1 user to register in a Laravel application

How to enforce only one user to register or be registered in a Laravel web…

3 years ago