Setting Up Cron Jobs
Cron jobs run scheduled tasks automatically:
- Log in to cPanel
- Go to Advanced > Cron Jobs
- Set the email address to receive cron output
- Under Add New Cron Job, set the schedule:
- Common Settings dropdown for presets (every 5 min, hourly, daily, etc.)
- Minute, Hour, Day, Month, Weekday for custom schedules
- Enter the command to run (full path)
- Click Add New Cron Job
Example cron schedule values:
*/5 * * * *- Every 5 minutes0 * * * *- Every hour at minute 00 2 * * *- Daily at 2:00 AM0 0 * * 0- Every Sunday at midnight
Tip: Use absolute paths in your commands (e.g., /usr/bin/php /home/username/script.php).