Skip to content

Cron jobs explained

A cron job is just a command that runs automatically on a schedule — every 5 minutes, every night at 3am, every Sunday. It’s how sites send newsletters, clear caches, run backups, and process queues without you lifting a finger.

The five cron fields are minute, hour, day of month, month and day of week on a timer… ***** minute hour day ofmonth month day ofweek “*” means “every” …runs this command php /…/cron.php

How to read the schedule

Five fields, left to right: minute · hour · day-of-month · month · day-of-week. A * means “every.” So 30 2 * * * = “at minute 30 of hour 2, every day” = 2:30am daily.

Common ones you can copy:

ScheduleMeans
*/5 * * * *every 5 minutes
0 * * * *every hour, on the hour
0 3 * * *every day at 3:00am
0 0 * * 0every Sunday at midnight
0 9 1 * *9:00am on the 1st of each month

(Not sure? crontab.guru translates any schedule into plain English.)

Add one in OrbixPanel

  1. Go to Cron Jobs → Add job.
  2. Enter the schedule (the five fields) and the command to run.
  3. Save. It now runs on its own — no terminal needed.

Writing the command (the part people get wrong)

  • Use full paths. Cron doesn’t start in your project folder, so php /home/orbix-you/example.com/cron.php, not php cron.php.
  • Run scripts with their program. A PHP task is php /path/script.php. Use curl -s https://… only if you actually want to hit a URL.
  • Keep a log so you can see it worked: add >> /home/orbix-you/cron.log 2>&1 to the end, then read that file in the File Manager.

Good uses for cron

  • Scheduled backups, cache warming, clearing temp files.
  • WordPress: a real cron (wp-cron.php) so scheduled posts/emails fire on time.
  • Laravel: php artisan schedule:run every minute drives all your app’s scheduled tasks.
  • Queue workers, report generation, newsletter sends.

Don’t schedule too tightly. “Every minute” is fine for a light script, but a heavy job every minute can pile up and eat resources — see usage limits.

Next: Backups & restore →