How to create a cron job

Today we will learn to setup a cron job.

The tutorial

Log in

Log in to your account at
https://www.000webhost.com/cpanel-login

Select your website

Click Manage Website on the website you want to add a cron job to.

7

Going to cron job

Go to Settings > Cron jobs

Creating the Cron job

Hit Create new cron job

Enter the script file name without /public_html/
If your script is in a directory (let’s say ‘scripts’), you should type scripts/<file name>
Then, set a time, and hit Create.

10

That’s it! We have created a cron job that runs every specified time, and executes the script :slight_smile:

3 Likes