Need help?
1300 210 210
We're Australian!
#1 for domains & hosting
94% customer satisfaction
Trusted by over 1 million businesses
Expert, 24/7 customer support
90% of issues resolved within a day
Best value
We price match*
Online Support Web Hosting

How to run a cron job

Cron is a software utility in Unix-like computer operating systems, which works as a time-based job scheduler. It can automate a command to run at fixed times, dates, or intervals.

A cron job is a command or script that is typically created and run to set up software environments or automate system maintenance and administration. For example, you could set a cron job to delete temporary files every week to free up disk space.

Creating a Cron Job

Here's how to create a cron job:

  1. Click on My Account at the top of this page.
  2. Select Hosting Manager from the drop-down menu.
  3. Enter your username and password and click Log In.
  4. On the Home page, click on the Advanced icon or [ v ] arrow symbol on the right side, then click on the Cron Jobs button.
  5. Under Add New Cron Job, select Common Settings from the drop-down list.
  6. Set the following details to schedule your command:
  7. Minute
    Enter a number from 0-59. Select Common Settings
    Enter a number from 0-23. Select Common Settings
    Enter a number from 1-31. Select Common Settings
    Enter a number from 1-12 or the first three letters of the month, example, Jan. Select Common Settings
    Enter a number from 0-7 or the first three letters of the weekday, example, Mon. Select Common Settings

  8. Under Command, specify the command to run then click Add New Cron Job.

Congratulations! You just successfully created a cron job.

Understanding the Command to Run

The command contains two parts:

[program to execute (php/pyth./perl)] [switches] [script]

The program to run will specify the type of script you are running and will either be:

  • PHP
  • Python
  • Perl/CGI Scripts (This should be in your cgi-bin with permission 0755)

The script will need to be set on its direct path where it is located on our server, for example:

    /home/username/public_html/path/to/script, with “username” being your actual username.

Run a PHP script:

php -q /home/username/public_html/scripts/testrun.php

Run a Python script:

python /home/username/public_html/path/to/script

Run a Perl/CGI script:


Understanding the User Agent String

Below is the command to set the user agent:

curl –user-agent YOUR_STRING (URL)

lynx –dump –useragent=YOUR_STRING (URL)

Congratulations! You just successfully run a cron job.

If you want to know how to use different PHP versions, click here.

If you want to know how to change your PHP version in the cPanel hosting, click here.

If you want to know what the path to the PERL and public_html folder is, click here.

Was this helpful? Yes No 69% of people found this helpful.