{"id":283,"date":"2021-04-29T12:19:16","date_gmt":"2021-04-29T06:34:16","guid":{"rendered":"https:\/\/nil.pro.np\/?p=283"},"modified":"2022-08-04T06:48:41","modified_gmt":"2022-08-04T01:03:41","slug":"set-up-cron-job-linux","status":"publish","type":"post","link":"https:\/\/nil.pro.np\/?p=283","title":{"rendered":"How to set up a cron job in Linux?"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">A few months ago I had tweeted about a cron job in Linux and many people showed interest in it. So, I decided to write a detailed Cron Job tutorial for begineer here.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">What is a cron job?<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Cron is a time-based job scheduler in Linux and Unix systems. It is used to schedule jobs (commands or shell scripts) to run periodically at fixed times, dates, or intervals. These scheduled jobs or commands are called cron jobs or simply called <a href=\"https:\/\/en.wikipedia.org\/wiki\/Cron\" target=\"_blank\" aria-label=\"cron (opens in a new tab)\" rel=\"noreferrer noopener\" class=\"rank-math-link\">cron<\/a>.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">&nbsp;In a simple term,&nbsp; Cron is a software utility that automates\/runs different tasks or commands at a specified time and date.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Command to set\/edit Crontab [cron configuration]<\/h2>\n\n\n\n<ol class=\"wp-block-list\"><li>To display the contents of a crontab file of the currently logged in user:<br><code>crontab -l<\/code><\/li><li>To display crontab file of the different user:<br><code>crontab -u username -l<\/code><\/li><li>To edit a crontab file of the current user:<br><code>crontab -e<\/code><\/li><li>To edit the crontab file of a different user:<br><code>crontab -u username -e<\/code><\/li><li>To remove or erase all cron job of the current user:<br><code>crontab -r<\/code><\/li><li>To remove or erase all cron job of the different user:<br><code>crontab -u username -r<\/code><\/li><\/ol>\n\n\n\n<h2 class=\"wp-block-heading\">Cron Job expression (Syntax of crontab)&nbsp;<\/h2>\n\n\n\n<pre class=\"wp-block-code\"><code>\u250c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 Minute (0 - 59)\n\u2502 \u250c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 Hour (0 - 23)\n\u2502 \u2502 \u250c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 Day of the month (1 - 31)\n\u2502 \u2502 \u2502 \u250c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 Month (1 - 12)\n\u2502 \u2502 \u2502 \u2502 \u250c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 Day of the week (0 - 6) (Sunday to Saturday, \n\u2502 \u2502 \u2502 \u2502 \u2502           7 is also Sunday on some systems)    \n\u2502 \u2502 \u2502 \u2502 \u2502\n\u2502 \u2502 \u2502 \u2502 \u2502\n\n* * * * *  &lt;command to execute&gt;<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Each field in front of the command represents a set of times to execute the command and is separated by white space. Generally, cron expressions contain five fields to represent the time but some may have 6 or 7 filed indicating second and year as well.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong><code>Minute(0-59) Hour(0-23) Day_of_the_month(1-31) Month(1-12) Day_of_the_week(0-6) &lt;command to execute&gt;<\/code><\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">In addition to value mention above each field can contain Star( * ), Comma ( , ), Dash( &#8211; ), Slash ( \/ ).<\/p>\n\n\n\n<div class=\"wp-block-columns are-vertically-aligned-center is-layout-flex wp-container-core-columns-is-layout-8f761849 wp-block-columns-is-layout-flex\">\n<div class=\"wp-block-column is-vertically-aligned-center is-layout-flow wp-block-column-is-layout-flow\" style=\"flex-basis:100%\">\n<div class=\"wp-block-group\"><div class=\"wp-block-group__inner-container is-layout-flow wp-block-group-is-layout-flow\">\n<figure class=\"wp-block-table is-style-stripes\"><table class=\"has-fixed-layout\"><thead><tr><th class=\"has-text-align-left\" data-align=\"left\">Cron Job Comand special character<\/th><th class=\"has-text-align-left\" data-align=\"left\">Description<\/th><\/tr><\/thead><tbody><tr><td class=\"has-text-align-left\" data-align=\"left\"><strong>Star( * )<\/strong><\/td><td class=\"has-text-align-left\" data-align=\"left\">This means all possible values (Always).<\/td><\/tr><tr><td class=\"has-text-align-left\" data-align=\"left\"><strong>Comma ( , )<\/strong><\/td><td class=\"has-text-align-left\" data-align=\"left\">With a comma we can specify multiple specific values on that field. For example, using &#8220;1, 2, 3&#8221; in the 2nd field (Hour) means this command will run on 1 AM, 2 AM, 3 AM. It will be like 3 separate commands while making the other field\u2019s value constant.<\/td><\/tr><tr><td class=\"has-text-align-left\" data-align=\"left\"><strong>Dash( &#8211; )<\/strong><\/td><td class=\"has-text-align-left\" data-align=\"left\">Dash defines ranges. For example, 0\u201330 on the first field (Minutes) indicates every minute between 0 and 30, inclusive.<\/td><\/tr><tr><td class=\"has-text-align-left\" data-align=\"left\"><strong>Slash ( \/ )<\/strong><\/td><td class=\"has-text-align-left\" data-align=\"left\">Slash defines step values (Interval). *\/n value runs for every n-th interval of time. For example, *\/5 in the minutes field indicates every 5 minutes. It is equivalent \u201c5,10,15,20,25,30,35,40,45,50,55,00\u201d.<\/td><\/tr><tr><td class=\"has-text-align-left\" data-align=\"left\"><strong>Question mark<\/strong> (?)<\/td><td class=\"has-text-align-left\" data-align=\"left\">Not to specify any value on day-of-month and day-of-week field.<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">Note: You can&#8217;t use wildcard * on the previous field if you are going to set step value[\/] in the next field. For example: To run every run command every 2 hours, you will need to set up minute field fixed time like first minute 0. If you set * on first filed then, the command will run every minute ignoring second<\/p>\n<\/div><\/div>\n<\/div>\n<\/div>\n\n\n\n<p class=\"wp-block-paragraph\">If a command on cron expression requires an argument, we can supply to it by appending at the end of the cron expression by separating with whitespace. <br><code>Minute(0-59) Hour(0-23) Day_of_the_month(1-31) Month(1-12) Day_of_the_week(0-6) &lt;command to execute> arg1 arg2<\/code><\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Non-standard macros to schedule cron jobs for a specific time:<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">We can use a single value macro command instead of five separate value to run a command at a these specific time:<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table><tbody><tr><td>Entry<\/td><td>Description<\/td><td>Equivalent to<\/td><\/tr><tr><td>@yearly (or @annually)<\/td><td>Run once a year at midnight of 1 January<\/td><td>0 0 1 1 *<\/td><\/tr><tr><td>@monthly<\/td><td>Run once a month at midnight on the first day of the month<\/td><td>0 0 1 * *<\/td><\/tr><tr><td>@weekly<\/td><td>Run once a week at midnight on Sunday morning<\/td><td>0 0 * * 0<\/td><\/tr><tr><td>@daily (or @midnight)<\/td><td>Run once a day at midnight<\/td><td>0 0 * * *<\/td><\/tr><tr><td>@hourly<\/td><td>Run once an hour at the beginning of the hour<\/td><td>0 * * * *<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<figure class=\"wp-block-embed is-type-rich is-provider-twitter wp-block-embed-twitter\"><div class=\"wp-block-embed__wrapper\">\n<blockquote class=\"twitter-tweet\" data-width=\"550\" data-dnt=\"true\"><p lang=\"en\" dir=\"ltr\">Cron is a time-based job scheduler in Linux. It is used to schedule jobs (commands or shell scripts) to run periodically at fixed times, dates, or intervals.<br><br>Thread \ud83d\udc47<a href=\"https:\/\/x.com\/hashtag\/100daysofcloud?src=hash&amp;ref_src=twsrc%5Etfw\">#100daysofcloud<\/a> <a href=\"https:\/\/x.com\/hashtag\/cloud?src=hash&amp;ref_src=twsrc%5Etfw\">#cloud<\/a> <a href=\"https:\/\/x.com\/hashtag\/100DaysOfCode?src=hash&amp;ref_src=twsrc%5Etfw\">#100DaysOfCode<\/a> <a href=\"https:\/\/t.co\/d5l4jcVB7A\">pic.twitter.com\/d5l4jcVB7A<\/a><\/p>&mdash; Nil Koirala (@knilkantha) <a href=\"https:\/\/x.com\/knilkantha\/status\/1299948764082266112?ref_src=twsrc%5Etfw\">August 30, 2020<\/a><\/blockquote><script async src=\"https:\/\/platform.x.com\/widgets.js\" charset=\"utf-8\"><\/script>\n<\/div><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Also Read: <\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\"><li><a class=\"rank-math-link\" href=\"https:\/\/nil.pro.np\/install-firewalld-centos\/\">How to install and set up firewalld in CentOS?<\/a><\/li><li><a class=\"rank-math-link\" href=\"https:\/\/nil.pro.np\/linux-ssh-key-guide\/\">Linux SSH Guide \u2013 SSH Key Management, Agent Forwarding<\/a><\/li><li><a href=\"https:\/\/nil.pro.np\/best-wordpress-theme\/\" data-type=\"post\" data-id=\"761\">10 Best WordPress Theme 2022<\/a><\/li><\/ul>\n\n\n\n<h2 class=\"wp-block-heading\">How to set up cron jobs in Linux?<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">We can easily create a cron job by simply adding time and command to execute in a crontab file.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">For example, if you want to run a backup script every 5 minutes, you will have to give execute permission to script, edit crontab file and add cron expression to indicate time and script with path.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Steps to set up a cron job to execute backup.sh script every 5 minutes&nbsp;<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">1) Give execute permissions to the script that you want to run with cron:<br><code>sudo chmod +x path\/backup.sh&nbsp;<\/code><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">2) Open crontab:<br><code>sudo crontab -e&nbsp;<\/code><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">This will open the cron configuration file (cron table).<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">3) Press \u201ci\u201d then add,<br><code>*\/5 * * * * script_path\/backup.sh<br><\/code>click \u201cESC\u201d and type \u201cx!\u201d then hit enter and exit. (vi editor)<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Cron Job Examples<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Some cron job example expression to run a backup script at a specific time. Here in this example script name is backup.sh and it is located in \/home\/nil\/ location so. <\/p>\n\n\n\n<figure class=\"wp-block-table\"><table><tbody><tr><td><strong>Cron Job<\/strong><\/td><td><strong>Command<\/strong><\/td><\/tr><tr><td>Cron Job to run backup every minute<\/td><td><em>* * * * * \/home\/nil\/backup.sh<\/em><\/td><\/tr><tr><td>Cron Job to run backup every 5 minutes<\/td><td><em>*\/5<\/em> <em>* * * * \/home\/nil\/backup.sh<\/em><\/td><\/tr><tr><td>Cron Job to run backup every 10 minutes<\/td><td><em>*\/10<\/em> <em>* * * * \/home\/nil\/backup.sh<\/em><\/td><\/tr><tr><td>Cron Job to run backup every  15 minutes<\/td><td><em>*\/15<\/em> <em>* * * * \/home\/nil\/backup.sh<\/em><\/td><\/tr><tr><td>Cron Job to run backup every 30 minutes<\/td><td>*\/<em>30 * * * * \/home\/nil\/backup.sh<\/em><\/td><\/tr><tr><td>Cron Job to run backup at 30th minute of every hour<\/td><td><em>30 * * * * \/home\/nil\/backup.sh<\/em><\/td><\/tr><tr><td>Cron Job to run backup every hours [first minute of every hour]<\/td><td><em>0 * * * * \/home\/nil\/backup.sh<\/em><\/td><\/tr><tr><td>Cron Job to run backup every 2 hours<\/td><td><em>0 *\/2 * * * \/home\/nil\/backup.sh<\/em><\/td><\/tr><tr><td>Cron Job to run backup every day at midnight<\/td><td><em>0 0 * * * \/home\/nil\/backup.sh<\/em><\/td><\/tr><tr><td>Cron Job to run backup every at 3 AM every day<\/td><td><em>0 3 * * * \/home\/nil\/backup.sh<\/em><\/td><\/tr><tr><td>Cron Job to run backup every 1st of the month<\/td><td><em>0 0 1 * * \/home\/nil\/backup.sh<\/em><\/td><\/tr><tr><td>Cron Job to run backup every 30th of the month <\/td><td><em>0 0 30 * * \/home\/nil\/backup.sh<\/em><\/td><\/tr><tr><td>Cron Job to run backup on June 1st midnight<\/td><td><em>0 0 0 6 * \/home\/nil\/backup.sh<\/em><\/td><\/tr><tr><td>Cron Job to run backup on everu Friday at midnight<\/td><td><em>0 0 * * 5 \/home\/nil\/backup.sh<\/em><\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\">What does * * * * * mean in cron job expression?<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">This means the cron job is set to run every minute [ i.e. every minute of every hour of every day of every month and every day of the week.]. An asterisk is a wildcard that represents &#8220;every value&#8221;.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">How to get the list of scheduled cron jobs on my computer?<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">To get the list of scheduled cron jobs for the current user.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>crontab \u2013l<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">To get the list of scheduled cron jobs for another user.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo crontab -l -u username<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Depending on the Linux distro, scheduled cron jobs are placed in different configuration files. Just check each file to get all list of scheduled cron jobs.<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li><code>\/var\/spool\/cron\/*<\/code> (user crontabs)<\/li><li><code>\/etc\/crontab<\/code> (system-wide crontab\/ root crontab)<\/li><li><code>\/etc\/cron.d\/*<\/code><\/li><li><code>\/etc\/cron.hourly<\/code><\/li><li> <code>\/etc\/cron.daily<\/code><\/li><li><code>\/etc\/cron.weekly<\/code><\/li><li> <code>\/etc\/cron.monthly<\/code><\/li><li>If you have anacron job scheduler also check (<code>\/etc\/anacrontab<\/code> and <code>\/var\/spool\/anacron\/*<\/code>)<\/li><\/ul>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"ftoc-heading-4\">How can I manage the results\/ output of any cron jobs? [Monitoring cron]<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">By default, cron logs only certain data ( like Timestamp, Hostname, PID, User, Command\/syntax ) in default log file (\/var\/log\/cron). <\/p>\n\n\n\n<p class=\"wp-block-paragraph\">If we need to log\/save other standard output or errors from the code executed then we need to explicitly configure. Other than that, we can send this log data to mail or completely discard it.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">To save the output of the script\/command to a file.<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">To save all output, error, and even echoed output inside the backup.sh script to a file backup.log.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>0 0 * * * \/home\/nil\/backup.sh &gt; \/home\/nil\/backup.log 2&gt;&amp;1<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">To send output\/result to email.<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">To set up mail on cron add mailto. Just above the cron scheduler command: <\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>MAILTO=user@domain.com \n0 0 * * * path\/script.sh<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">To save\/send the only error to email and discard other output.<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">To save the error output of <code>backup.sh<\/code> to <code>backup_error.log<\/code> and discarding the standard output.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>0 0 * * * \/home\/nil\/backup.sh 1&gt; \/dev\/null 2&gt; \/home\/nil\/backup_error.log<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">To send error output of <code>backup.sh<\/code> to user@domain.com and discarding the standard output.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>0 0 * * * \/home\/nil\/backup.sh 1&gt; \/dev\/null 2&gt;&amp;1 | mail -s \" backup cron error\" user@domain.com <\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">To discard all output.<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Sometimes we don&#8217;t need output in console or log result and just leaving default may add log spam in your email or a bunch of logfile in your computer you will need to clean later. Instead, we can discard all output before reaching your mail or logfile by redirecting them to a special file \/dev\/null.<\/p>\n\n\n\n<pre id=\"block-da2bfb5c-4257-4b38-a1c9-dda10e9d09f9\" class=\"wp-block-code\"><code>* * * * *  (command to execute) &gt; \/dev\/null 2&gt;&amp;1\n\/\/To discard all output of backup script\n* * * * * \/home\/nil\/backup.sh &gt; \/dev\/null 2&gt;&amp;1<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Note:<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>&gt; to redirect the output from command to destination it following, to \/dev\/null in the last case.<\/li><li>1 denotes standard output (stdout) and 2 denotes standard error (stderr). <\/li><li>So 2&gt;&amp;1 says to send the standard error to where ever standard output is being redirected.<\/li><li>\/dev\/null is a special file that\u2019s present in the Linux system used to only write. Whatever we write to \/dev\/null will be discarded, forgotten into the void.<\/li><\/ul>\n\n\n\n<h2 class=\"wp-block-heading\">How to use Linux cron instead of PHP cron (wp-cron.php) in WordPress?&nbsp;&nbsp;<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\"><a href=\"https:\/\/nil.pro.np\/wordpress\/\" data-type=\"category\" data-id=\"10\">WordPress<\/a> uses the PHP environment to automate\/schedule tasks through wp-cron and wp-cron gets triggered on each visitor request. Just by moving this WordPress cron job from PHP to Linux native cron can improve the performance of WordPress.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">First, disable WordPress wp-cron by adding the below code in wp-config.php file.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>define('DISABLE_WP_CRON', true)<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Now, wp-cron won&#8217;t get trigger on visitor requests. So we need to trigger wp-cron.php from Linux cron manually. There is two way to trigger wp-cron from native Linux cron <\/p>\n\n\n\n<h4 class=\"wp-block-heading\">With get request to wp-cron.php file <\/h4>\n\n\n\n<pre class=\"wp-block-code\"><code>\/\/Code to run wp-cron every 5 minute in Linux cron job\n*\/5&nbsp;* * * * wget -q -O - http:\/\/yourwebsite.com\/wp-cron.php?doing_wp_cron &gt;\/dev\/null 2&gt;&amp;1<\/code><\/pre>\n\n\n\n<h4 class=\"wp-block-heading\">Triggering wp-cron directly within Linux environment<\/h4>\n\n\n\n<pre class=\"wp-block-code\"><code>*\/5 * * * * \/usr\/bin\/php \/var\/www\/cron.php \/dev\/null 2&gt;&amp;1\n\/\/ \/var\/www\/ is WordPress install location<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">How to set cron Job in Cpanel?<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Login to Cpanel.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Scroll to the Advanced section and click on Cron Jobs.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" src=\"https:\/\/nil.pro.np\/wp-content\/uploads\/2021\/04\/cpanel-cron-jobs-1024x157.png\" alt=\"Cpanel Cron Job\" class=\"wp-image-300\"\/><figcaption>Cpanel Cron Job<\/figcaption><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">Enter the email to email notification, and scheduling time on each field as explained above and at last enter actual command to execute. And click on Add New Cron Job. Now your Cron Job will be listed below in the Current Cron Jobs section.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" src=\"https:\/\/nil.pro.np\/wp-content\/uploads\/2021\/04\/Cpanel-cron-job-configuration.png\" alt=\"Cpanel Cron Job Configurator\" class=\"wp-image-301\"\/><figcaption>Cpanel Cron Job Configurator<\/figcaption><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\">Best Free Cronjob expression generator<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Sometimes cron expression becomes confusing even for pro-Linux users. However, we can easily generate and test our expressions (crontab syntax) without worrying with these free online tools. Then, we just need to copy &amp; paste it into our crontab file.<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li><a aria-label=\"crontab guru (opens in a new tab)\" href=\"https:\/\/crontab.guru\" target=\"_blank\" rel=\"noreferrer noopener\" class=\"rank-math-link\">crontab guru<\/a><\/li><li><a aria-label=\"crontab (opens in a new tab)\" href=\"http:\/\/corntab.com\/\" target=\"_blank\" rel=\"noreferrer noopener\" class=\"rank-math-link\">crontab GUI <\/a><\/li><li><a aria-label=\"Crontab Generator (opens in a new tab)\" href=\"https:\/\/crontab-generator.org\/\" target=\"_blank\" rel=\"noreferrer noopener\" class=\"rank-math-link\">Crontab Generator<\/a><\/li><li><a aria-label=\"CronMaker (opens in a new tab)\" href=\"http:\/\/www.cronmaker.com\/\" target=\"_blank\" rel=\"noreferrer noopener\" class=\"rank-math-link\">CronMaker<\/a><\/li><\/ul>\n\n\n\n<hr class=\"wp-block-separator has-css-opacity\"\/>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Read More<\/strong>:<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li><a aria-label=\"Blogging Tutorials Series for Beginner [Free] (opens in a new tab)\" href=\"https:\/\/nil.pro.np\/free-blogging-tutorials-for-beginner\/\" target=\"_blank\" rel=\"noreferrer noopener\" class=\"rank-math-link\">Blogging Tutorials Series for Beginner [Free]<\/a><\/li><li><a class=\"rank-math-link\" href=\"https:\/\/nil.pro.np\/css-flexbox-guide\/\">CSS Guide: Flexbox Cheatsheet<\/a><\/li><\/ul>\n\n\n\n<hr class=\"wp-block-separator has-css-opacity\"\/>\n\n\n\n<p class=\"wp-block-paragraph\">If you have any confusion following this tutorial or any topics on this <a href=\"https:\/\/nil.pro.np\/\" class=\"rank-math-link\">Nil blog,<\/a> don\u2019t hesitate to ask in the comment section. You can also reach me on <a aria-label=\"Twitter (opens in a new tab)\" href=\"http:\/\/twitter.com\/knilkantha\/\" target=\"_blank\" rel=\"noreferrer noopener\" class=\"rank-math-link\"><strong>Twitter<\/strong><\/a>.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>A few months ago I had tweeted about a cron job in Linux and many people showed interest in it. So, I decided to write a detailed Cron Job tutorial for begineer here. What is a cron job? Cron is a time-based job scheduler in Linux and Unix systems. It is used to schedule jobs&hellip;&nbsp;<a href=\"https:\/\/nil.pro.np\/?p=283\" class=\"\" rel=\"bookmark\">Read More &raquo;<span class=\"screen-reader-text\">How to set up a cron job in Linux?<\/span><\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"neve_meta_sidebar":"","neve_meta_container":"","neve_meta_enable_content_width":"","neve_meta_content_width":0,"neve_meta_title_alignment":"","neve_meta_author_avatar":"","neve_post_elements_order":"","neve_meta_disable_header":"","neve_meta_disable_footer":"","neve_meta_disable_title":"","footnotes":""},"categories":[12,4],"tags":[],"class_list":["post-283","post","type-post","status-publish","format-standard","hentry","category-hosting","category-how-to"],"_links":{"self":[{"href":"https:\/\/nil.pro.np\/index.php?rest_route=\/wp\/v2\/posts\/283","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/nil.pro.np\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/nil.pro.np\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/nil.pro.np\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/nil.pro.np\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=283"}],"version-history":[{"count":23,"href":"https:\/\/nil.pro.np\/index.php?rest_route=\/wp\/v2\/posts\/283\/revisions"}],"predecessor-version":[{"id":877,"href":"https:\/\/nil.pro.np\/index.php?rest_route=\/wp\/v2\/posts\/283\/revisions\/877"}],"wp:attachment":[{"href":"https:\/\/nil.pro.np\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=283"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/nil.pro.np\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=283"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/nil.pro.np\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=283"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}