A cron job is a task your server runs on a schedule. WordPress, Laravel and many apps need a cron to run background work.
Create one
- cPanel → Cron Jobs.
- Pick a common schedule from the dropdown (e.g. Once Per Five Minutes) or use the five fields directly.
- Enter the command. Examples:
- WordPress:
cd ~/public_html && /usr/local/bin/php wp-cron.php >/dev/null 2>&1 - Laravel scheduler:
cd ~/public_html && /usr/local/bin/php artisan schedule:run >> /dev/null 2>&1
- WordPress:
- Click Add New Cron Job.
Tips
- Don't run anything more often than once a minute — most shared servers will throttle you.
- Always redirect output (
>/dev/null 2>&1) unless you want an email every run. - Use the absolute path to PHP (
/usr/local/bin/php) — barephpmay not work.