You can set certain commands and scripts to run automatically on a set schedule – as regularly as once an hour or as rarely as once a year.
These scheduled tasks are also known as cron jobs, and can be set to run on an hourly, daily, weekly, or monthly basis.
You can set up to three cron jobs in your eXtend Control Panel. If you need more automatic commands, you can run the cron job on a script that executes the commands you need.
When you set up the cron job, you need to specify the interpreter – the version of the language you are using – as well as the script. You can find the paths to the versions of the languages available in 'Paths and Versions' under 'Website Help & Diagnostics' in your eXtend Control Panel.
When you know your path and version for your interpreter, you then write your cron job in this format:
/[INTERPRETER] /[FILE] [ARGUMENT]
Where [INTERPRETER] is the path to the right version of the language, [FILE] is the script you want to run, and [ARGUMENT] are the arguments for the script.
If you wanted to run a particular PHP file, the cron job would be:
/usr/bin/php /home/sites/your-domain.com/public_html/cron.php task=tidy owner=1
To set up your cron job:
When you pick a numerical value for the cron job (such as Day, Hour, or Minute), the value is the time it will run, not the number of times it will run. For example, if you select “19 minutes” under the Minute value for your cron job, it will not run every 19 minutes, but will start on the 19th minute past the hour.
Article ID: 266
Created On: Fri, Mar 13, 2015 at 1:07 PM
Last Updated On: Thu, Apr 23, 2015 at 12:44 PM
Online URL: https://www.heartinternet.uk/support/article/how-do-i-run-scheduled-tasks-cron-jobs-in-my-account.html