--- title: Cron Job description: Scheduled server tasks for backups, queues, and maintenance. Bad timing can hammer resources at peak hours. canonical: https://penasihathosting.com/en/hosting-wiki/cron-job type: wiki locale: en updated: 2026-07-15 author: Willya Randika --- # Cron Job ## Overview - **Summary:** Scheduled server tasks for backups, queues, and maintenance. Bad timing can hammer resources at peak hours. - **Author:** Willya Randika ([profile](/penulis/willya-randika)) ## Article **A cron job** is a scheduled server task: “run this command daily at 02:00”, “every fifteen minutes”, and so on. Hosting uses cron for backups, mail queues, stock sync, alternative `wp-cron`, and routine maintenance scripts that repeat. Badly timed cron can wake the site at peak hours and contribute to [Entry Process limits](/en/hosting-wiki/entry-processes-ep). Reliable cron, on the other hand, makes recurring work independent of human traffic to the website. A good schedule balances business needs with the capacity of your hosting plan. ## A Simple Analogy Cron is a **recurring alarm plus a to-do list**. The alarm rings, the system runs the command, then sleeps until the next schedule. If the alarm fires every minute for heavy work, the “house” (server) never rests calmly. ## Common Format Many panels show five time fields plus a command: ```text * * * * * command │ │ │ │ │ │ │ │ │ └── day of week │ │ │ └──── month │ │ └────── day of month │ └──────── hour └────────── minute ``` Example: `0 2 * * *` means every day at 02:00. In [cPanel](/en/hosting-wiki/cpanel) open **Cron Jobs** — use presets or advanced mode. ## Example Uses - Hitting `wp-cron.php` over HTTP or WP-CLI - Cleaning logs or caches - Generating sitemaps or syncing feeds off-peak - Dumping databases to external storage (keep credentials safe) ## What to Watch For - Run heavy jobs (full backups, imports) **off-peak** - Send output to a log or `/dev/null` intentionally — cron email can flood inboxes - Use absolute paths for PHP/CLI (`which php`) - Duplicate crons (panel + plugin + systemd) mean double work - Test the command manually over [SSH](/en/hosting-wiki/ssh) before scheduling it ## FAQ WordPress ships visitor-triggered WP-Cron. For low traffic or critical jobs, a system cron hitting `wp-cron.php` is more reliable. Check permissions, paths, the executing user, and error logs. Shared hosts may block some CLI binaries. Technically yes, but it costs resources. Keep scripts fast and justify the frequency. The command produces output. Redirect stdout/stderr to a log file or discard output if you do not need notices.