{"id":28156,"date":"2025-07-01T13:18:32","date_gmt":"2025-07-01T11:18:32","guid":{"rendered":"https:\/\/tremhost.com\/blog\/?p=28156"},"modified":"2025-07-01T13:18:32","modified_gmt":"2025-07-01T11:18:32","slug":"a-tutorial-on-using-the-cron-jobs-feature-in-plesk","status":"publish","type":"post","link":"https:\/\/tremhost.com\/blog\/a-tutorial-on-using-the-cron-jobs-feature-in-plesk\/","title":{"rendered":"A tutorial on using the Cron Jobs feature in Plesk"},"content":{"rendered":"<h2>How to Use the Cron Jobs Feature in Plesk<\/h2>\n<p>Cron jobs are scheduled tasks that your server runs automatically at set intervals\u2014perfect for automating repetitive tasks like backups, script execution, or email reports.<\/p>\n<hr \/>\n<h3>1. Log in to Your Plesk Panel<\/h3>\n<ul>\n<li>Open your browser and enter your Plesk login URL (e.g., <code>https:\/\/yourdomain.com:8443<\/code>).<\/li>\n<li>Enter your username and password.<\/li>\n<\/ul>\n<hr \/>\n<h3>2. Access Scheduled Tasks (Cron Jobs)<\/h3>\n<ul>\n<li>In the left sidebar, click on <strong>Websites &amp; Domains<\/strong>.<\/li>\n<li>Find and click your domain name (if you have more than one).<\/li>\n<li>Look for the <strong>Scheduled Tasks<\/strong> or <strong>Cron Jobs<\/strong> icon (the name may differ depending on your Plesk version) and click it.<\/li>\n<\/ul>\n<hr \/>\n<h3>3. Add a New Cron Job<\/h3>\n<ol>\n<li><strong>Click Add Task<\/strong>\n<ul>\n<li>You\u2019ll see a button like <strong>Add Task<\/strong> or <strong>Add Cron Job<\/strong>.<\/li>\n<\/ul>\n<\/li>\n<li><strong>Choose Task Type<\/strong>\n<ul>\n<li><strong>Run a command<\/strong>: Executes a shell command\/script.<\/li>\n<li><strong>Fetch a URL<\/strong>: Uses <code>wget<\/code> or <code>curl<\/code> to access a web address.<\/li>\n<li><strong>Run PHP script<\/strong>: Executes a PHP script using the PHP interpreter.<\/li>\n<\/ul>\n<\/li>\n<li><strong>Enter the Command or Script<\/strong>\n<ul>\n<li>For example, to run a PHP script, you might enter:\n<div class=\"MarkdownCodeBlock_container__nRn2j\">\n<div class=\"MarkdownCodeBlock_codeBlock__rvLec force-dark\">\n<div class=\"MarkdownCodeBlock_codeHeader__zWt_V\">\n<div class=\"MarkdownCodeBlock_languageName__4_BF8\"><\/div>\n<div class=\"MarkdownCodeBlock_codeActions__wvgwQ\"><button class=\"button_root__TL8nv button_ghost__YsMI5 button_sm__hWzjK button_center__RsQ_o button_showIconOnly-compact-below___fiXt MarkdownCodeBlock_codeActionButton__xJBAg\" type=\"button\" data-theme=\"ghost\"><span class=\"button_label__mCaDf\">Copy<\/span><\/button><\/div>\n<\/div>\n<div class=\"\" data-collapsed=\"unknown\">\n<pre class=\"MarkdownCodeBlock_preTag__QMZEO MarkdownCodeBlock_horizontalOverflowHidden__YPHxg\"><code class=\"MarkdownCodeBlock_codeTag__5BV0Z\">php \/var\/www\/vhosts\/yourdomain.com\/httpdocs\/script.php\r\n<\/code><\/pre>\n<\/div>\n<\/div>\n<\/div>\n<\/li>\n<li>Or to fetch a URL:\n<div class=\"MarkdownCodeBlock_container__nRn2j\">\n<div class=\"MarkdownCodeBlock_codeBlock__rvLec force-dark\">\n<div class=\"MarkdownCodeBlock_codeHeader__zWt_V\">\n<div class=\"MarkdownCodeBlock_languageName__4_BF8\"><\/div>\n<div class=\"MarkdownCodeBlock_codeActions__wvgwQ\"><button class=\"button_root__TL8nv button_ghost__YsMI5 button_sm__hWzjK button_center__RsQ_o button_showIconOnly-compact-below___fiXt MarkdownCodeBlock_codeActionButton__xJBAg\" type=\"button\" data-theme=\"ghost\"><span class=\"button_label__mCaDf\">Copy<\/span><\/button><\/div>\n<\/div>\n<div class=\"\" data-collapsed=\"unknown\">\n<pre class=\"MarkdownCodeBlock_preTag__QMZEO MarkdownCodeBlock_horizontalOverflowHidden__YPHxg\"><code class=\"MarkdownCodeBlock_codeTag__5BV0Z\">wget -q -O - https:\/\/yourdomain.com\/cron-script.php\r\n<\/code><\/pre>\n<\/div>\n<\/div>\n<\/div>\n<\/li>\n<\/ul>\n<\/li>\n<li><strong>Set the Schedule<\/strong>\n<ul>\n<li>Use the interface to set how often your task runs (every minute, hour, day, etc.).<\/li>\n<li>You can use the dropdowns or enter cron syntax (like <code>0 2 * * *<\/code> for 2 AM daily).<\/li>\n<\/ul>\n<\/li>\n<li><strong>(Optional) Set Notification Email<\/strong>\n<ul>\n<li>Enter your email address if you want to receive notifications or output from your cron job.<\/li>\n<\/ul>\n<\/li>\n<li><strong>Save the Task<\/strong>\n<ul>\n<li>Click <strong>OK<\/strong> or <strong>Apply<\/strong> to save.<\/li>\n<\/ul>\n<\/li>\n<\/ol>\n<hr \/>\n<h3>4. Managing Your Cron Jobs<\/h3>\n<ul>\n<li>All your scheduled tasks are listed on the <strong>Scheduled Tasks<\/strong> page.<\/li>\n<li>You can <strong>edit<\/strong>, <strong>disable<\/strong>, <strong>enable<\/strong>, or <strong>delete<\/strong> any task as needed.<\/li>\n<li>Check the logs or your notification email to confirm tasks are running as expected.<\/li>\n<\/ul>\n<hr \/>\n<p><strong>Tips:<\/strong><\/p>\n<ul>\n<li>Always test scripts manually before scheduling them as cron jobs.<\/li>\n<li>If you\u2019re unsure about schedule syntax, use the Plesk interface\u2019s helpful dropdowns or look up a <a href=\"https:\/\/crontab.guru\/\" target=\"_blank\" rel=\"noopener nofollow\">cron expression generator<\/a>.<\/li>\n<li>Keep your scripts secure and only automate trusted tasks.<\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>How to Use the Cron Jobs Feature in Plesk Cron jobs are scheduled tasks that your server runs automatically at set intervals\u2014perfect for automating repetitive tasks like backups,&hellip;<\/p>\n","protected":false},"author":226,"featured_media":8569,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_monsterinsights_skip_tracking":false,"footnotes":""},"categories":[49],"tags":[],"class_list":["post-28156","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-tips"],"_links":{"self":[{"href":"https:\/\/tremhost.com\/blog\/wp-json\/wp\/v2\/posts\/28156","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/tremhost.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/tremhost.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/tremhost.com\/blog\/wp-json\/wp\/v2\/users\/226"}],"replies":[{"embeddable":true,"href":"https:\/\/tremhost.com\/blog\/wp-json\/wp\/v2\/comments?post=28156"}],"version-history":[{"count":1,"href":"https:\/\/tremhost.com\/blog\/wp-json\/wp\/v2\/posts\/28156\/revisions"}],"predecessor-version":[{"id":28157,"href":"https:\/\/tremhost.com\/blog\/wp-json\/wp\/v2\/posts\/28156\/revisions\/28157"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/tremhost.com\/blog\/wp-json\/wp\/v2\/media\/8569"}],"wp:attachment":[{"href":"https:\/\/tremhost.com\/blog\/wp-json\/wp\/v2\/media?parent=28156"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/tremhost.com\/blog\/wp-json\/wp\/v2\/categories?post=28156"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/tremhost.com\/blog\/wp-json\/wp\/v2\/tags?post=28156"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}