How to create a cron job (scheduled task)

For hosting customers · Updated 2026-10-29

On this page
  1. Steps
  2. The schedule format
  3. Examples
  4. Good to know
  5. Common questions

A cron job runs a command on a schedule — for example a PHP script every 5 minutes, a cleanup every night or a report every Monday. Cron jobs run as your own user, with the same files and limits as your websites.

Steps

  1. Log in to the control panel (https://<server>:2083).
  2. Open Cron Jobs in the menu (section Advanced).
  3. Under Add cron job, click in Schedule and choose a preset — Every 5 minutes, Every hour, Once a day, Once a week or Once a month — or type your own (see below).
  4. Enter the Command, for example /usr/bin/php ~/public_html/cron.php.
  5. Click Add.

The job appears in the list and runs from its next scheduled time.

The schedule format

Five fields separated by spaces: minute hour day month weekday. * means "every", */n "every n", and lists like 1,15 or ranges like 1-5 are allowed.

ScheduleRuns
*/5 * * * *every 5 minutes
0 * * * *every hour, on the hour
30 2 * * *every day at 02:30
0 0 * * 0every Sunday at midnight
0 0 1 * *on the first day of every month
0 9 * * 1-5at 09:00, Monday to Friday

Times are the server's time.

Examples

WordPress, instead of running its scheduler on page visits:

/usr/bin/php ~/public_html/wp-cron.php >/dev/null 2>&1

Laravel's scheduler, every minute (schedule * * * * *):

cd ~/myapp && /usr/bin/php artisan schedule:run >/dev/null 2>&1

Good to know

  • Your plan sets how many cron jobs you can have. The limit is shown at the top of the page.
  • A command is one line of up to 1000 characters. Chain steps with &&.
  • Add >/dev/null 2>&1 to commands that print output you do not need, or write it to a log file, for example >> ~/logs/cron.log 2>&1.
  • Cron jobs count toward your processor, memory and process limits (Resource Usage).
  • Cron jobs do not run while the account is suspended.
  • To change a job, delete it with Delete and add it again.

Common questions

Why do I get "Invalid cron field"?

One of the five fields uses something other than numbers, *, /, , and -. Names such as MON or @daily are not accepted; use 1 or 0 0 * * *.

How do I test my command first?

Run it in the Terminal (if your plan has shell access) exactly as you entered it, and check the output.

Was this article helpful?

Still stuck?

Ask the AI about your exact situation — it answers from this knowledge base — or contact us.