What Is a Cron Job
A cron job is a task your hosting account runs automatically on a schedule you define: nightly backups, sending queued emails, syncing stock levels, cleaning temporary files, or triggering WordPress scheduled posts reliably. Anything you can run as a command can be scheduled.
Adding a Cron Job in cPanel
- Open Cron Jobs in cPanel from the client area at app.techguru.co.in.
- Under Add New Cron Job, pick a schedule from the Common Settings dropdown, such as Once Per Day, or fill in the five timing fields manually.
- Enter the command to run, then click Add New Cron Job.
Understanding the Schedule Fields
The five fields are minute, hour, day of month, month, and day of week. A star means every. Examples:
0 2 * * *— every day at 02:00 server time.*/15 * * * *— every 15 minutes.30 1 * * 0— Sundays at 01:30.
Common Commands
- Run a PHP script:
php /home/username/public_html/scripts/cleanup.php - Call a URL:
curl -s https://yourdomain.in/cron/run > /dev/null - WordPress real cron:
wp cron event run --due-now --path=/home/username/public_html
Replace username with your actual cPanel username, visible on the right side of the cPanel home page.
Good Practices
- Set the cron email field to your address while testing so output reaches you, then silence noisy jobs by appending a redirect to /dev/null.
- Do not schedule heavy jobs every minute on shared hosting; our systems flag accounts that abuse cron frequency. Every 5 minutes is a sensible floor.
- Stagger multiple jobs a few minutes apart instead of all at 00:00.
- Remember server time may differ from IST; check the current server time shown in cPanel before scheduling business hour tasks.
If a job silently fails, capture its output to a log file and open a support ticket with the command and the log contents.