A cron job is a scheduled command. Hosting applications use cron for tasks that need to happen without someone loading a page, such as sending reminders, clearing queues, renewing services, or publishing scheduled content.
Why Cron Matters
Without cron, automation becomes unreliable. WordPress scheduled posts may wait for visitors. Billing systems may not send invoices. Queues may grow without being processed.
Use the Command From the Application
Most applications show the exact cron command they expect. Copy that command rather than guessing the path. The PHP binary, application path, and arguments all matter.
Check the Schedule
Some tasks should run every few minutes. Others should run hourly or daily. Follow the application's documentation and avoid running expensive jobs more often than needed.
Watch CLI PHP
Cron runs through command-line PHP. If CLI PHP uses a different version or missing extensions, the website may work while cron fails. This is common with encoded applications and billing systems.
After adding a cron job, check the application's automation page or logs to confirm it has run successfully.
A Schedule Has Five Time Fields
Cron normally specifies minute, hour, day of month, month and day of week. Confirm the server's time zone and avoid schedules that unintentionally run every minute. For routine work, choose an off-peak time and stagger jobs so backups, imports and reports do not compete simultaneously.
Use Complete Commands
Use absolute paths for PHP, scripts and working directories because cron runs with a limited environment. Select the PHP version supported by the application, quote paths safely and redirect output to a controlled log where useful. Never place passwords directly in a publicly readable command.
Prevent Overlap and Silent Failure
A slow task may still be running when the next schedule starts. Use the application's locking mechanism or an appropriate system lock. Monitor exit status and recent-run timestamps, rotate logs and alert when an expected job stops completing.