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

FTP getting array of file details such as size using PHP

Using FTP and PHP to get an array of file details such as size and…

3 years ago

Creating Laravel form requests

Creating and using Laravel form requests to create cleaner code, separation and reusability for your…

3 years ago

Improving the default Laravel login and register views

Improving the default Laravel login and register views in such a simple manner but making…

3 years ago

Laravel validation for checking if value exists in the database

Laravel validation for checking if a field value exists in the database. The validation rule…

3 years ago