{"id":2329,"date":"2026-04-01T23:38:03","date_gmt":"2026-04-01T23:38:03","guid":{"rendered":"https:\/\/veerhost.com\/docs\/how-to-add-cron-job-cpanel\/"},"modified":"2026-07-02T23:02:40","modified_gmt":"2026-07-02T23:02:40","slug":"how-to-add-cron-job-cpanel","status":"publish","type":"docs","link":"https:\/\/veerhost.com\/de\/docs\/getting-started\/how-to-add-cron-job-cpanel\/","title":{"rendered":"How to Add a Cron Job in cPanel"},"content":{"rendered":"<h2 class=\"wp-block-heading\">Overview<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">A <strong>cron job<\/strong> is a scheduled task that runs automatically at set intervals on your server. They are commonly used to send scheduled emails, run backups, clear caches, update data feeds, or trigger WordPress scheduled events. cPanel has a built-in Cron Jobs tool that makes this easy to set up without touching the command line.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">How to Add a Cron Job<\/h2>\n\n\n\n<ol class=\"wp-block-list\">\n<li>Log in to your <strong>cPanel<\/strong> account.<\/li>\n<li>In the <strong>Advanced<\/strong> section, click <strong>Cron Jobs<\/strong>.<\/li>\n<li>Under <strong>Add New Cron Job<\/strong>, choose how often you want it to run using the <strong>Common Settings<\/strong> dropdown (e.g., <em>Once Per Day<\/em>, <em>Once Per Hour<\/em>).<\/li>\n<li>In the <strong>Command<\/strong> field, enter the command to run.<\/li>\n<li>Click <strong>Add New Cron Job<\/strong> to save.<\/li>\n<\/ol>\n\n\n\n<h2 class=\"wp-block-heading\">Common Cron Job Examples<\/h2>\n\n\n\n<figure class=\"wp-block-table\"><table><thead><tr><th>Task<\/th><th>Command<\/th><\/tr><\/thead><tbody><tr><td>Trigger WordPress WP-Cron manually<\/td><td><code>php \/home\/username\/public_html\/wp-cron.php<\/code><\/td><\/tr><tr><td>Run a PHP script<\/td><td><code>php \/home\/username\/public_html\/myscript.php<\/code><\/td><\/tr><tr><td>Run a Bash script<\/td><td><code>\/bin\/bash \/home\/username\/scripts\/backup.sh<\/code><\/td><\/tr><tr><td>Fetch a URL (triggers an action)<\/td><td><code>curl -s https:\/\/yourdomain.com\/cron-trigger.php<\/code><\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">Replace <code>username<\/code> with your actual cPanel username.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Understanding the Cron Schedule Fields<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">If you need a custom schedule beyond the presets, you can enter values directly. The five fields from left to right are:<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table><thead><tr><th>Field<\/th><th>Meaning<\/th><th>Allowed values<\/th><\/tr><\/thead><tbody><tr><td>Minute<\/td><td>Minute of the hour<\/td><td>0\u201359<\/td><\/tr><tr><td>Hour<\/td><td>Hour of the day<\/td><td>0\u201323<\/td><\/tr><tr><td>Day<\/td><td>Day of the month<\/td><td>1\u201331<\/td><\/tr><tr><td>Month<\/td><td>Month of the year<\/td><td>1\u201312<\/td><\/tr><tr><td>Weekday<\/td><td>Day of the week (0 = Sunday)<\/td><td>0\u20136<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">Use <code>*<\/code> for &ldquo;every&rdquo;. For example, <code>0 *\/6 * * *<\/code> means every 6 hours.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">WordPress and Cron Jobs<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">WordPress has its own scheduling system called <strong>WP-Cron<\/strong>, but it only fires when someone visits your website. On low-traffic sites, this can cause scheduled posts, backups, or plugin tasks to be delayed. The fix is to:<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li>Disable WP-Cron in <code>wp-config.php<\/code> by adding: <code>define('DISABLE_WP_CRON', true);<\/code><\/li>\n<li>Add a real cron job in cPanel to call <code>wp-cron.php<\/code> every 15 minutes.<\/li>\n<\/ol>\n\n\n\n<h2 class=\"wp-block-heading\">How to Edit or Delete a Cron Job<\/h2>\n\n\n\n<ul class=\"wp-block-list\">\n<li>To <strong>edit<\/strong> an existing cron job, scroll to <em>Current Cron Jobs<\/em> and click <strong>Edit<\/strong> next to the one you want to change.<\/li>\n<li>To <strong>delete<\/strong> a cron job, click the <strong>Delete<\/strong> button next to it. This stops it immediately.<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">Need help setting up a cron job? <a href=\"https:\/\/veerhost.com\/de\/support\/\" target=\"_blank\" rel=\"noopener noreferrer\">Contact our support team<\/a>.<\/p>","protected":false},"excerpt":{"rendered":"<p>Overview A cron job is a scheduled task that runs automatically at set intervals on your server. They are commonly used to [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"parent":1894,"menu_order":9,"comment_status":"open","ping_status":"closed","template":"","doc_tag":[],"class_list":["post-2329","docs","type-docs","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/veerhost.com\/de\/wp-json\/wp\/v2\/docs\/2329","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/veerhost.com\/de\/wp-json\/wp\/v2\/docs"}],"about":[{"href":"https:\/\/veerhost.com\/de\/wp-json\/wp\/v2\/types\/docs"}],"author":[{"embeddable":true,"href":"https:\/\/veerhost.com\/de\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/veerhost.com\/de\/wp-json\/wp\/v2\/comments?post=2329"}],"version-history":[{"count":1,"href":"https:\/\/veerhost.com\/de\/wp-json\/wp\/v2\/docs\/2329\/revisions"}],"predecessor-version":[{"id":2335,"href":"https:\/\/veerhost.com\/de\/wp-json\/wp\/v2\/docs\/2329\/revisions\/2335"}],"up":[{"embeddable":true,"href":"https:\/\/veerhost.com\/de\/wp-json\/wp\/v2\/docs\/1894"}],"wp:attachment":[{"href":"https:\/\/veerhost.com\/de\/wp-json\/wp\/v2\/media?parent=2329"}],"wp:term":[{"taxonomy":"doc_tag","embeddable":true,"href":"https:\/\/veerhost.com\/de\/wp-json\/wp\/v2\/doc_tag?post=2329"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}