{"id":18211,"date":"2021-09-13T06:53:00","date_gmt":"2021-09-13T06:53:00","guid":{"rendered":"https:\/\/www.hostinger.com\/tutorials\/?p=18211"},"modified":"2025-12-17T03:03:49","modified_gmt":"2025-12-17T03:03:49","slug":"cron-job","status":"publish","type":"post","link":"\/tutorials\/cron-job","title":{"rendered":"Cron job explained: Syntax, scheduling, and best use cases"},"content":{"rendered":"<p>A cron job is a time-based scheduler in Unix-like operating systems, such as Linux and macOS. It automates repetitive tasks like backups, system maintenance, and script execution.<\/p><p>Users define a schedule and command in a crontab file to keep critical processes running consistently in the background without manual intervention.<\/p><p>To use cron effectively, you need to understand its core components:<\/p><ul class=\"wp-block-list\">\n<li><strong>Syntax and operators<\/strong>. Cron uses five timing fields (minute, hour, day of month, month, and day of week) and special characters, such as asterisks and slashes, to define intervals.<\/li>\n\n\n\n<li><strong>Configuration<\/strong>. Users manage schedules with the <strong>crontab<\/strong> command or by placing scripts in specific system directories.<\/li>\n\n\n\n<li><strong>Permissions<\/strong>. The <strong>cron.allow<\/strong> and <strong>cron.deny<\/strong> files control access and help maintain system security.<\/li>\n\n\n\n<li><strong>Practical application<\/strong>. Common use cases include automating database backups, clearing server caches, and sending periodic email reports.<\/li>\n<\/ul><p>\n\n\n\n\n\n\n<\/p><h2 class=\"wp-block-heading\" id=\"h-what-is-a-cron-job\">What is a cron job?<\/h2><p>A cron job is <strong>a utility that lets Linux and Unix users run commands or scripts automatically at a specified time and date<\/strong>. Instead of running a command manually every day or week, you schedule it once, and the system executes it in the background at the set time.<\/p><p>This automation is important for server management. For example, a system administrator managing a virtual private server (VPS) cannot back up databases manually every night at 3:00 AM.<\/p><p>A cron job handles this task reliably, improving efficiency and reducing human error.<\/p><p>Common cron job use cases include:<\/p><ul class=\"wp-block-list\">\n<li><strong>System maintenance<\/strong>. Deleting temporary files, rotating log files, or clearing cached data to free up disk space.<\/li>\n\n\n\n<li><strong>Data management<\/strong>. Dumping MySQL databases to a backup folder or syncing files between remote servers.<\/li>\n\n\n\n<li><strong>Notifications<\/strong>. Sending automated email digests, checking for system updates, or monitoring disk usage and alerting admins when space runs low.<\/li>\n\n\n\n<li><strong>Web applications<\/strong>. Triggering PHP scripts for tasks such as newsletter distribution or subscription renewals.<\/li>\n<\/ul><h2 class=\"wp-block-heading\" id=\"h-how-does-a-cron-job-work\">How does a cron job work?<\/h2><p>A cron job <strong>runs through the cron daemon (crond)<\/strong>, a background service that runs continuously and executes commands defined in <strong>cron table (crontab)<\/strong> files.<\/p><p>Every minute, the daemon checks the configuration files and determines whether any tasks are scheduled to run at that time.<\/p><p>It&rsquo;s important to distinguish between the two types of configuration files:<\/p><ul class=\"wp-block-list\">\n<li><strong>System crontab<\/strong>. Located at <strong>\/etc\/crontab<\/strong>, this file handles system-wide tasks and only root users can edit it. It includes an extra field that specifies which user runs the command.<\/li>\n\n\n\n<li><strong>User crontab<\/strong>. Each user has their own crontab file. The storage location varies by distribution, such as <strong>\/var\/spool\/cron\/crontabs\/<\/strong> on Debian and Ubuntu and <strong>\/var\/spool\/cron\/<\/strong> on RHEL, CentOS, and Fedora. Users edit these files with the <strong>crontab -e<\/strong> command, and the tasks run with that user&rsquo;s permissions.<\/li>\n<\/ul><h2 class=\"wp-block-heading\" id=\"h-understanding-crontab-syntax-and-operators\">Understanding crontab syntax and operators<\/h2><p>Crontab syntax defines scheduled tasks (cron jobs) using a single line with five time-and-date fields followed by the command to execute. Special operators add flexibility when you define time intervals.<\/p><p>Here&rsquo;s the basic format of a crontab entry:<\/p><pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">minute hour day_of_month month day_of_week command_to_execute<\/pre><h3 class=\"wp-block-heading\" id=\"h-the-five-timing-fields-minute-hour-date\">The five timing fields (minute, hour, date)<\/h3><p>The five timing fields define when a cron job runs. The system reads the schedule in the following order:<\/p><figure tabindex=\"0\" class=\"wp-block-table\"><table><tbody><tr><td><strong>Field<\/strong><\/td><td><strong>Description<\/strong><\/td><td><strong>Allowed values<\/strong><\/td><\/tr><tr><td><strong>Minute<\/strong><\/td><td>The minute of the hour when the command runs.<\/td><td>0&ndash;59<\/td><\/tr><tr><td><strong>Hour<\/strong><\/td><td>The hour of the day in 24-hour format.<\/td><td>0&ndash;23<\/td><\/tr><tr><td><strong>Day of month<\/strong><\/td><td>The specific date of the month.<\/td><td>1&ndash;31<\/td><\/tr><tr><td><strong>Month<\/strong><\/td><td>The month of the year.<\/td><td>1&ndash;12 or JAN&ndash;DEC<\/td><\/tr><tr><td><strong>Day of week<\/strong><\/td><td>The day of the week.<\/td><td>0&ndash;6, where Sunday = 0 (or 7 on some systems)<\/td><\/tr><\/tbody><\/table><\/figure><p>\n\n\n<div><p class=\"important\"><strong>Important!<\/strong> Be careful when scheduling jobs across multiple servers in different time zones. Always check each server&rsquo;s local time with the <strong>date<\/strong> command to confirm your configuration is correct.<\/p><\/div>\n\n\n\n<\/p><h3 class=\"wp-block-heading\" id=\"h-crontab-operators\">Crontab operators<\/h3><p>Crontab operators let you define complex intervals and patterns within the timing fields. Cronie and its predecessor, Vixie cron, support eight operators.<\/p><p>These implementations serve as the default cron tools on most Linux distributions, including Ubuntu, Debian, RHEL, CentOS, and Fedora:<\/p><ul class=\"wp-block-list\">\n<li><strong>Asterisk (*)<\/strong>. Represents all possible values. For example, an asterisk in the minute field means the job runs every minute.<\/li>\n\n\n\n<li><strong>Comma (,)<\/strong>. Specifies a list of unique values. For example, <strong>1,5<\/strong> in the day of week field runs the task on Monday and Friday.<\/li>\n\n\n\n<li><strong>Hyphen (-)<\/strong>. Defines a range of values. For example, <strong>6-9<\/strong> in the month field runs the job from June to September.<\/li>\n\n\n\n<li><strong>Slash (\/)<\/strong>. Specifies step values or increments. For example, <strong>*\/12<\/strong> in the hour field runs the command every 12 hours.<\/li>\n<\/ul><p>These operators are not supported by standard Linux cron. They work only in Java-based schedulers, such as Quartz and Spring Boot, or cloud services like AWS EventBridge:<\/p><ul class=\"wp-block-list\">\n<li><strong>Last (L)<\/strong>. Specifies the last day of the month or the last occurrence of a weekday.<\/li>\n\n\n\n<li><strong>Weekday (W)<\/strong>. Finds the nearest weekday (Monday&ndash;Friday) to a given date.<\/li>\n\n\n\n<li><strong>Hash (#)<\/strong>. Specifies the nth occurrence of a weekday, such as the second Monday of the month.<\/li>\n\n\n\n<li><strong>Question mark (?)<\/strong>. Indicates that the day of month or day of week does not matter.<\/li>\n<\/ul><p>\n\n\n<div class=\"protip\">\n                    <h4 class=\"title\">&#128161; Pro tip<\/h4>\n                    <p>Most cron implementations let you combine ranges with step values. For example, <strong>1-20\/2<\/strong> runs a job every two minutes during the first 20 minutes.<\/p>\n                <\/div>\n\n\n\n<\/p><h3 class=\"wp-block-heading\" id=\"h-cron-job-examples\">Cron job examples<\/h3><p>The following examples show how to apply crontab syntax to real-world tasks.<\/p><figure tabindex=\"0\" class=\"wp-block-table\"><table><tbody><tr><td><strong>Cron syntax<\/strong><\/td><td><strong>Purpose<\/strong><\/td><td><strong>Explanation<\/strong><\/td><\/tr><tr><td><strong>0 0 * * 0 \/root\/backup.sh<\/strong><\/td><td>Weekly backup<\/td><td>Runs the backup script every Sunday at midnight.<\/td><\/tr><tr><td><strong>0 * * * 1 \/root\/clearcache.sh<\/strong><\/td><td>Server maintenance<\/td><td>Clears the cache every hour, but only on Mondays.<\/td><\/tr><tr><td><strong>0 6,18 * * * \/root\/db-dump.sh<\/strong><\/td><td>Database snapshot<\/td><td>Dumps the database twice a day at 6 AM and 6 PM.<\/td><\/tr><tr><td><strong>*\/10 * * * * \/scripts\/monitor.sh<\/strong><\/td><td>Uptime monitoring<\/td><td>Runs a monitoring script every 10 minutes.<\/td><\/tr><tr><td><strong>0 0 1,15 * * \/scripts\/payroll.php<\/strong><\/td><td>Bi-monthly task<\/td><td>Runs a payroll script on the 1st and 15th of every month at midnight.<\/td><\/tr><tr><td><strong>30 2 * * * \/usr\/bin\/apt update<\/strong><\/td><td>System update<\/td><td>Checks for package updates daily at 2:30 AM, which is usually a low-traffic time.<\/td><\/tr><tr><td><strong>* * * * \/scripts\/s1.sh; \/scripts\/s2.sh<\/strong><\/td><td>Multiple tasks<\/td><td>Runs multiple commands in a single cron job by separating them with a semicolon.<\/td><\/tr><tr><td><strong>0 8 1-7 * * [ &ldquo;$(date &lsquo;+\\%u&rsquo;)&rdquo; = &ldquo;1&rdquo; ] &amp;&amp; \/scripts\/report.sh<\/strong><\/td><td>Monthly report<\/td><td>Generates a report at 8 AM on days 1&ndash;7 of the month, but only executes the script when it&rsquo;s Monday.<\/td><\/tr><\/tbody><\/table><\/figure><h2 class=\"wp-block-heading\" id=\"h-what-are-cron-job-special-strings\">What are cron job special strings?<\/h2><p>Special strings are <strong>shortcuts that start with @ and replace the five-field syntax<\/strong>. They improve readability for common schedules and reduce the risk of syntax errors.<\/p><ul class=\"wp-block-list\">\n<li><strong>@reboot<\/strong>. Runs the command once when the cron daemon starts.<\/li>\n\n\n\n<li><strong>@hourly<\/strong>. Runs once an hour (equivalent to <strong>0 * * * *<\/strong>).<\/li>\n\n\n\n<li><strong>@daily<\/strong> (or <strong>@midnight<\/strong>). Runs once a day at midnight (equivalent to <strong>0 0 * * *<\/strong>).<\/li>\n\n\n\n<li><strong>@weekly<\/strong>. Runs once a week on Sunday at midnight (equivalent to <strong>0 0 * * 0<\/strong>).<\/li>\n\n\n\n<li><strong>@monthly<\/strong>. Runs once a month on the 1st at midnight (equivalent to <strong>0 0 1 * *<\/strong>).<\/li>\n\n\n\n<li><strong>@yearly<\/strong> (or <strong>@annually<\/strong>). Runs once a year on January 1st (equivalent to <strong>0 0 1 1 *<\/strong>).<\/li>\n<\/ul><p>Here are a few examples of cron jobs using special strings:<\/p><pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">@daily \/home\/user\/scripts\/daily-cleanup.sh\n@reboot \/usr\/local\/bin\/start-my-app.sh\n@hourly \/var\/www\/html\/monitor.php<\/pre><p>\n\n\n<div><p class=\"important\"><strong>Important!<\/strong> The <strong>@reboot<\/strong> directive runs when the cron daemon starts, not necessarily when the system boots. If you stop and restart the cron service without rebooting the system, <strong>@reboot<\/strong> jobs run again.<\/p><\/div>\n\n\n\n<\/p><h2 class=\"wp-block-heading\" id=\"h-cron-permissions\">Cron permissions<\/h2><p>System administrators control who can schedule cron jobs using two files in the <strong>\/etc\/<\/strong> directory: <strong>cron.allow<\/strong> and <strong>cron.deny<\/strong>.<\/p><ul class=\"wp-block-list\">\n<li><strong>cron.allow<\/strong>. If this file exists, only the users listed in it can create, edit, or run cron jobs. The system blocks all other users.<\/li>\n\n\n\n<li><strong>cron.deny<\/strong>. If <strong>cron.allow<\/strong> doesn&rsquo;t exist, the system checks this file instead. Users listed here cannot use cron, while all other users can.<\/li>\n<\/ul><p>If neither file exists, the default behavior depends on the distribution:<\/p><ul class=\"wp-block-list\">\n<li><strong>Debian and Ubuntu<\/strong>. All users can use cron by default.<\/li>\n\n\n\n<li><strong>RHEL, CentOS, and Fedora<\/strong>. Only root can use cron by default.<\/li>\n<\/ul><p>Always check your distribution&rsquo;s documentation or test cron access with a non-root user.<\/p><p>For example, to allow only a database administrator (<strong>dbadmin<\/strong>) to schedule tasks, create a <strong>cron.allow<\/strong> file and add <strong>dbadmin<\/strong> to it. This setup prevents other users from running unauthorized background tasks that consume system resources.<\/p><h2 class=\"wp-block-heading\" id=\"h-how-to-set-up-a-cron-job\">How to set up a cron job<\/h2><p>To set up a cron job, open your machine&rsquo;s terminal, confirm that cron is installed, create or edit a crontab file with <strong>crontab -e<\/strong>, and view your scheduled tasks with <strong>crontab -l<\/strong>.<\/p><p>Some jobs may require elevated or root privileges, or you may need to place scripts in system directories for recurring tasks.<\/p><h3 class=\"wp-block-heading\" id=\"h-1-access-the-terminal-or-ssh\">1. Access the terminal or SSH<\/h3><p>To manage cron jobs, access your server&rsquo;s command line. If you use a remote server or VPS, connect through SSH with a client such as <a href=\"\/tutorials\/how-to-use-putty-ssh\">PuTTY<\/a> on Windows or Terminal on macOS or Linux.<\/p><p>Alternatively, <a href=\"\/vps-hosting\">Hostinger VPS<\/a> users can use the <strong>browser terminal<\/strong> feature available in the VPS dashboard of hPanel.<\/p><div class=\"wp-block-image\">\n<figure data-wp-context='{\"imageId\":\"69d7f3389d5f0\"}' data-wp-interactive=\"core\/image\" class=\"aligncenter size-large wp-lightbox-container\"><img decoding=\"async\" width=\"2088\" height=\"922\" data-wp-class--hide=\"state.isContentHidden\" data-wp-class--show=\"state.isContentVisible\" data-wp-init=\"callbacks.setButtonStyles\" data-wp-on-async--click=\"actions.showLightbox\" data-wp-on-async--load=\"callbacks.setButtonStyles\" data-wp-on-async-window--resize=\"callbacks.setButtonStyles\" src=\"https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2021\/09\/hpanel-vps-overview-terminal-highlighted.png\/public\" alt=\"Hostinger hPanel VPS overview with browser terminal highlighted\" class=\"wp-image-137461\" srcset=\"https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2021\/09\/hpanel-vps-overview-terminal-highlighted.png\/w=2088,fit=scale-down 2088w, https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2021\/09\/hpanel-vps-overview-terminal-highlighted.png\/w=300,fit=scale-down 300w, https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2021\/09\/hpanel-vps-overview-terminal-highlighted.png\/w=1024,fit=scale-down 1024w, https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2021\/09\/hpanel-vps-overview-terminal-highlighted.png\/w=150,fit=scale-down 150w, https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2021\/09\/hpanel-vps-overview-terminal-highlighted.png\/w=768,fit=scale-down 768w, https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2021\/09\/hpanel-vps-overview-terminal-highlighted.png\/w=1536,fit=scale-down 1536w, https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2021\/09\/hpanel-vps-overview-terminal-highlighted.png\/w=2048,fit=scale-down 2048w\" sizes=\"(max-width: 2088px) 100vw, 2088px\" \/><button class=\"lightbox-trigger\" type=\"button\" aria-haspopup=\"dialog\" aria-label=\"Enlarge\" data-wp-init=\"callbacks.initTriggerButton\" data-wp-on-async--click=\"actions.showLightbox\" data-wp-style--right=\"state.imageButtonRight\" data-wp-style--top=\"state.imageButtonTop\">\n\t\t\t<svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"12\" height=\"12\" fill=\"none\" viewbox=\"0 0 12 12\">\n\t\t\t\t<path fill=\"#fff\" d=\"M2 0a2 2 0 0 0-2 2v2h1.5V2a.5.5 0 0 1 .5-.5h2V0H2Zm2 10.5H2a.5.5 0 0 1-.5-.5V8H0v2a2 2 0 0 0 2 2h2v-1.5ZM8 12v-1.5h2a.5.5 0 0 0 .5-.5V8H12v2a2 2 0 0 1-2 2H8Zm2-12a2 2 0 0 1 2 2v2h-1.5V2a.5.5 0 0 0-.5-.5H8V0h2Z\"><\/path>\n\t\t\t<\/svg>\n\t\t<\/button><\/figure><\/div><figure class=\"wp-block-image size-large\"><a class=\"hgr-tutorials-cta hgr-tutorials-cta-vps-hosting\" href=\"\/vps-hosting\" target=\"_blank\" rel=\"noreferrer noopener\"><img decoding=\"async\" width=\"1024\" height=\"300\" src=\"https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2023\/02\/VPS-hosting-banner.png\/public\" alt=\"\" class=\"wp-image-77934\" srcset=\"https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2023\/02\/VPS-hosting-banner.png\/w=1024,fit=scale-down 1024w, https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2023\/02\/VPS-hosting-banner.png\/w=300,fit=scale-down 300w, https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2023\/02\/VPS-hosting-banner.png\/w=150,fit=scale-down 150w, https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2023\/02\/VPS-hosting-banner.png\/w=768,fit=scale-down 768w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/a><\/figure><h3 class=\"wp-block-heading\" id=\"h-2-install-cron\">2. Install cron<\/h3><p>Most Linux distributions include cron by default. To confirm that it&rsquo;s installed and running, check the service status:<\/p><pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">systemctl status cron<\/pre><div class=\"wp-block-image\">\n<figure data-wp-context='{\"imageId\":\"69d7f338a00f9\"}' data-wp-interactive=\"core\/image\" class=\"aligncenter size-large wp-lightbox-container\"><img decoding=\"async\" width=\"2286\" height=\"626\" data-wp-class--hide=\"state.isContentHidden\" data-wp-class--show=\"state.isContentVisible\" data-wp-init=\"callbacks.setButtonStyles\" data-wp-on-async--click=\"actions.showLightbox\" data-wp-on-async--load=\"callbacks.setButtonStyles\" data-wp-on-async-window--resize=\"callbacks.setButtonStyles\" src=\"https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2021\/09\/terminal-systemctl-status-cron-active-running-highlighted.png\/public\" alt=\"Terminal showing cron service active and running status\" class=\"wp-image-137507\" srcset=\"https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2021\/09\/terminal-systemctl-status-cron-active-running-highlighted.png\/w=2286,fit=scale-down 2286w, https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2021\/09\/terminal-systemctl-status-cron-active-running-highlighted.png\/w=300,fit=scale-down 300w, https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2021\/09\/terminal-systemctl-status-cron-active-running-highlighted.png\/w=1024,fit=scale-down 1024w, https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2021\/09\/terminal-systemctl-status-cron-active-running-highlighted.png\/w=150,fit=scale-down 150w, https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2021\/09\/terminal-systemctl-status-cron-active-running-highlighted.png\/w=768,fit=scale-down 768w, https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2021\/09\/terminal-systemctl-status-cron-active-running-highlighted.png\/w=1536,fit=scale-down 1536w, https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2021\/09\/terminal-systemctl-status-cron-active-running-highlighted.png\/w=2048,fit=scale-down 2048w\" sizes=\"(max-width: 2286px) 100vw, 2286px\" \/><button class=\"lightbox-trigger\" type=\"button\" aria-haspopup=\"dialog\" aria-label=\"Enlarge\" data-wp-init=\"callbacks.initTriggerButton\" data-wp-on-async--click=\"actions.showLightbox\" data-wp-style--right=\"state.imageButtonRight\" data-wp-style--top=\"state.imageButtonTop\">\n\t\t\t<svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"12\" height=\"12\" fill=\"none\" viewbox=\"0 0 12 12\">\n\t\t\t\t<path fill=\"#fff\" d=\"M2 0a2 2 0 0 0-2 2v2h1.5V2a.5.5 0 0 1 .5-.5h2V0H2Zm2 10.5H2a.5.5 0 0 1-.5-.5V8H0v2a2 2 0 0 0 2 2h2v-1.5ZM8 12v-1.5h2a.5.5 0 0 0 .5-.5V8H12v2a2 2 0 0 1-2 2H8Zm2-12a2 2 0 0 1 2 2v2h-1.5V2a.5.5 0 0 0-.5-.5H8V0h2Z\"><\/path>\n\t\t\t<\/svg>\n\t\t<\/button><\/figure><\/div><p>If the service is missing, install it with your package manager.<\/p><ul class=\"wp-block-list\">\n<li>For Ubuntu and Debian:<\/li>\n<\/ul><pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">sudo apt update\nsudo apt install cron<\/pre><ul class=\"wp-block-list\">\n<li>For RHEL, CentOS, and Fedora:<\/li>\n<\/ul><pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">sudo dnf install cronie\nsudo systemctl enable crond\nsudo systemctl start crond<\/pre><h3 class=\"wp-block-heading\" id=\"h-3-create-or-edit-a-crontab-file\">3. Create or edit a crontab file<\/h3><p>The main way to schedule tasks is with the crontab command. To create a new crontab file or edit an existing one, run:<\/p><pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">crontab -e<\/pre><p>If your system doesn&rsquo;t already have a crontab file for your user, this command creates one automatically.<\/p><p>If this is your first time running the command, the system prompts you to choose a text editor, such as <strong>nano<\/strong> or <strong>vim<\/strong>. <a href=\"\/tutorials\/how-to-install-and-use-nano-text-editor\">nano<\/a> is usually easier for beginners.<\/p><p>Once the file opens, add your scheduled task on a new line.<\/p><div class=\"wp-block-image\">\n<figure data-wp-context='{\"imageId\":\"69d7f338a1be2\"}' data-wp-interactive=\"core\/image\" class=\"aligncenter size-large wp-lightbox-container\"><img decoding=\"async\" width=\"2560\" height=\"1549\" data-wp-class--hide=\"state.isContentHidden\" data-wp-class--show=\"state.isContentVisible\" data-wp-init=\"callbacks.setButtonStyles\" data-wp-on-async--click=\"actions.showLightbox\" data-wp-on-async--load=\"callbacks.setButtonStyles\" data-wp-on-async-window--resize=\"callbacks.setButtonStyles\" src=\"https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2021\/09\/terminal-nano-tmp-crontab-scaled.png\/public\" alt=\"Nano editor open with a crontab file in the terminal\" class=\"wp-image-137508\" srcset=\"https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2021\/09\/terminal-nano-tmp-crontab-scaled.png\/w=2560,fit=scale-down 2560w, https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2021\/09\/terminal-nano-tmp-crontab-scaled.png\/w=300,fit=scale-down 300w, https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2021\/09\/terminal-nano-tmp-crontab-scaled.png\/w=1024,fit=scale-down 1024w, https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2021\/09\/terminal-nano-tmp-crontab-scaled.png\/w=150,fit=scale-down 150w, https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2021\/09\/terminal-nano-tmp-crontab-scaled.png\/w=768,fit=scale-down 768w, https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2021\/09\/terminal-nano-tmp-crontab-scaled.png\/w=1536,fit=scale-down 1536w, https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2021\/09\/terminal-nano-tmp-crontab-scaled.png\/w=2048,fit=scale-down 2048w\" sizes=\"(max-width: 2560px) 100vw, 2560px\" \/><button class=\"lightbox-trigger\" type=\"button\" aria-haspopup=\"dialog\" aria-label=\"Enlarge\" data-wp-init=\"callbacks.initTriggerButton\" data-wp-on-async--click=\"actions.showLightbox\" data-wp-style--right=\"state.imageButtonRight\" data-wp-style--top=\"state.imageButtonTop\">\n\t\t\t<svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"12\" height=\"12\" fill=\"none\" viewbox=\"0 0 12 12\">\n\t\t\t\t<path fill=\"#fff\" d=\"M2 0a2 2 0 0 0-2 2v2h1.5V2a.5.5 0 0 1 .5-.5h2V0H2Zm2 10.5H2a.5.5 0 0 1-.5-.5V8H0v2a2 2 0 0 0 2 2h2v-1.5ZM8 12v-1.5h2a.5.5 0 0 0 .5-.5V8H12v2a2 2 0 0 1-2 2H8Zm2-12a2 2 0 0 1 2 2v2h-1.5V2a.5.5 0 0 0-.5-.5H8V0h2Z\"><\/path>\n\t\t\t<\/svg>\n\t\t<\/button><\/figure><\/div><p>For a detailed breakdown of cron syntax, see our guide on <a href=\"\/tutorials\/crontab-syntax\">how to write crontab commands<\/a>.<\/p><p>\n\n\n<div class=\"protip\">\n                    <h4 class=\"title\">&#128161; Pro tip<\/h4>\n                    <p>Before scheduling a cron job, test your script manually to confirm it works. Run the script directly over SSH, for example <strong>.\/backup.sh<\/strong>. If it doesn&rsquo;t run manually, it won&rsquo;t run through cron either.<\/p>\n                <\/div>\n\n\n\n<\/p><h3 class=\"wp-block-heading\" id=\"h-4-view-scheduled-tasks\">4. View scheduled tasks<\/h3><p>To view the cron jobs scheduled for your user account without editing them, use the list flag:<\/p><pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">crontab -l<\/pre><div class=\"wp-block-image\">\n<figure data-wp-context='{\"imageId\":\"69d7f338a3716\"}' data-wp-interactive=\"core\/image\" class=\"aligncenter size-large wp-lightbox-container\"><img decoding=\"async\" width=\"1878\" height=\"1410\" data-wp-class--hide=\"state.isContentHidden\" data-wp-class--show=\"state.isContentVisible\" data-wp-init=\"callbacks.setButtonStyles\" data-wp-on-async--click=\"actions.showLightbox\" data-wp-on-async--load=\"callbacks.setButtonStyles\" data-wp-on-async-window--resize=\"callbacks.setButtonStyles\" src=\"https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2021\/09\/terminal-crontab-l-apt-update-highlighted.png\/public\" alt=\"Terminal showing crontab -l output with a scheduled apt update\" class=\"wp-image-137509\" srcset=\"https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2021\/09\/terminal-crontab-l-apt-update-highlighted.png\/w=1878,fit=scale-down 1878w, https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2021\/09\/terminal-crontab-l-apt-update-highlighted.png\/w=300,fit=scale-down 300w, https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2021\/09\/terminal-crontab-l-apt-update-highlighted.png\/w=1024,fit=scale-down 1024w, https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2021\/09\/terminal-crontab-l-apt-update-highlighted.png\/w=150,fit=scale-down 150w, https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2021\/09\/terminal-crontab-l-apt-update-highlighted.png\/w=768,fit=scale-down 768w, https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2021\/09\/terminal-crontab-l-apt-update-highlighted.png\/w=1536,fit=scale-down 1536w\" sizes=\"(max-width: 1878px) 100vw, 1878px\" \/><button class=\"lightbox-trigger\" type=\"button\" aria-haspopup=\"dialog\" aria-label=\"Enlarge\" data-wp-init=\"callbacks.initTriggerButton\" data-wp-on-async--click=\"actions.showLightbox\" data-wp-style--right=\"state.imageButtonRight\" data-wp-style--top=\"state.imageButtonTop\">\n\t\t\t<svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"12\" height=\"12\" fill=\"none\" viewbox=\"0 0 12 12\">\n\t\t\t\t<path fill=\"#fff\" d=\"M2 0a2 2 0 0 0-2 2v2h1.5V2a.5.5 0 0 1 .5-.5h2V0H2Zm2 10.5H2a.5.5 0 0 1-.5-.5V8H0v2a2 2 0 0 0 2 2h2v-1.5ZM8 12v-1.5h2a.5.5 0 0 0 .5-.5V8H12v2a2 2 0 0 1-2 2H8Zm2-12a2 2 0 0 1 2 2v2h-1.5V2a.5.5 0 0 0-.5-.5H8V0h2Z\"><\/path>\n\t\t\t<\/svg>\n\t\t<\/button><\/figure><\/div><p>To view the cron jobs for a specific user, run the following command and replace username with the appropriate account name. Note that this requires root or elevated privileges.<\/p><pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">sudo crontab -u username -l<\/pre><h3 class=\"wp-block-heading\" id=\"h-5-grant-root-access-if-needed\">5. Grant root access if needed<\/h3><p>Some commands, such as system updates or changes to system-wide configuration files, require root privileges. The simplest way to schedule these tasks is to add them to the root user&rsquo;s crontab:<\/p><pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">sudo crontab -e<\/pre><p>Any command in root&rsquo;s crontab runs with root privileges and requires no additional configuration.<\/p><p>\n\n\n<div><p class=\"important\"><strong>Important!<\/strong> Avoid running tasks as root unless necessary. If a script only needs access to specific files or directories, consider adjusting file ownership with the <a href=\"\/tutorials\/linux-chown-command\">chown command<\/a> or using a dedicated service account instead.<\/p><\/div>\n\n\n\n<\/p><h3 class=\"wp-block-heading\" id=\"h-6-use-cron-directories-for-recurring-scripts\">6. Use cron directories for recurring scripts<\/h3><p>For general maintenance scripts that don&rsquo;t need to run at a specific minute, you can place them in predefined system directories. The system automatically runs executable scripts found in these locations:<\/p><ul class=\"wp-block-list\">\n<li><strong>\/etc\/cron.hourly\/<\/strong><\/li>\n\n\n\n<li><strong>\/etc\/cron.daily\/<\/strong><\/li>\n\n\n\n<li><strong>\/etc\/cron.weekly\/<\/strong><\/li>\n\n\n\n<li><strong>\/etc\/cron.monthly\/<\/strong><\/li>\n<\/ul><p>To run correctly, scripts in these directories must have executable permissions and follow the <strong>run-parts<\/strong> naming rules:<\/p><ul class=\"wp-block-list\">\n<li>Filenames can include only uppercase and lowercase letters, digits, underscores (<strong>_<\/strong>), and hyphens (<strong>&ndash;<\/strong>).<\/li>\n\n\n\n<li>Filenames must not use file extensions. For example, a script named <strong>backup.sh<\/strong> will be ignored. Rename it to <strong>backup<\/strong> instead.<\/li>\n\n\n\n<li>Filenames must not contain dots (<strong>.<\/strong>) anywhere. For example, <strong>my.script<\/strong> will fail silently, which is a common source of errors.<\/li>\n<\/ul><h3 class=\"wp-block-heading\" id=\"h-7-delete-scheduled-tasks\">7. Delete scheduled tasks<\/h3><p>To remove all cron jobs for the current user, use the remove flag:<\/p><pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">crontab -r<\/pre><p>Because this command deletes all entries instantly, it&rsquo;s safer to combine it with the interactive (<strong>-i<\/strong>) flag. This option asks for confirmation before removing all scheduled tasks:<\/p><pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">crontab -ri<\/pre><div class=\"wp-block-image\">\n<figure data-wp-context='{\"imageId\":\"69d7f338a55ea\"}' data-wp-interactive=\"core\/image\" class=\"aligncenter size-large wp-lightbox-container\"><img decoding=\"async\" width=\"1682\" height=\"148\" data-wp-class--hide=\"state.isContentHidden\" data-wp-class--show=\"state.isContentVisible\" data-wp-init=\"callbacks.setButtonStyles\" data-wp-on-async--click=\"actions.showLightbox\" data-wp-on-async--load=\"callbacks.setButtonStyles\" data-wp-on-async-window--resize=\"callbacks.setButtonStyles\" src=\"https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2021\/09\/terminal-crontab-ri.png\/public\" alt=\"Terminal prompting confirmation for crontab -ri command\" class=\"wp-image-137510\" srcset=\"https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2021\/09\/terminal-crontab-ri.png\/w=1682,fit=scale-down 1682w, https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2021\/09\/terminal-crontab-ri.png\/w=300,fit=scale-down 300w, https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2021\/09\/terminal-crontab-ri.png\/w=1024,fit=scale-down 1024w, https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2021\/09\/terminal-crontab-ri.png\/w=150,fit=scale-down 150w, https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2021\/09\/terminal-crontab-ri.png\/w=768,fit=scale-down 768w, https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2021\/09\/terminal-crontab-ri.png\/w=1536,fit=scale-down 1536w\" sizes=\"(max-width: 1682px) 100vw, 1682px\" \/><button class=\"lightbox-trigger\" type=\"button\" aria-haspopup=\"dialog\" aria-label=\"Enlarge\" data-wp-init=\"callbacks.initTriggerButton\" data-wp-on-async--click=\"actions.showLightbox\" data-wp-style--right=\"state.imageButtonRight\" data-wp-style--top=\"state.imageButtonTop\">\n\t\t\t<svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"12\" height=\"12\" fill=\"none\" viewbox=\"0 0 12 12\">\n\t\t\t\t<path fill=\"#fff\" d=\"M2 0a2 2 0 0 0-2 2v2h1.5V2a.5.5 0 0 1 .5-.5h2V0H2Zm2 10.5H2a.5.5 0 0 1-.5-.5V8H0v2a2 2 0 0 0 2 2h2v-1.5ZM8 12v-1.5h2a.5.5 0 0 0 .5-.5V8H12v2a2 2 0 0 1-2 2H8Zm2-12a2 2 0 0 1 2 2v2h-1.5V2a.5.5 0 0 0-.5-.5H8V0h2Z\"><\/path>\n\t\t\t<\/svg>\n\t\t<\/button><\/figure><\/div><p>\n\n<div><p class=\"important\"><strong>Important!<\/strong> The <strong>-i<\/strong> flag works only when used with <strong>-r<\/strong>. Running <strong>crontab -i<\/strong> by itself has no effect.<\/p><\/div>\n\n\n\n<\/p><h2 class=\"wp-block-heading\" id=\"h-what-s-the-next-step-after-scheduling-tasks-with-cron\"><strong>What&rsquo;s the next step after scheduling tasks with cron?<\/strong><\/h2><p>Cron jobs automate recurring tasks by combining the cron daemon (which runs continuously), the crontab file (which sets the schedule), and the command that performs the work. This automation is essential for efficient system management and handling routine tasks without manual intervention.<\/p><p>However, cron jobs are only as powerful as the scripts they run. The cron daemon triggers commands at set times, but your script does the actual work. And if the script contains errors, the task will fail even if the cron job runs successfully.<\/p><p>Learning to write efficient Bash scripts lets you automate complex and valuable tasks via cron. Check out our <a href=\"https:\/\/www.hostinger.com\/tutorials\/bash-script-example\">Bash script tutorial<\/a> to get started.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>A cron job is a time-based scheduler in Unix-like operating systems, such as Linux and macOS. It automates repetitive tasks [&#8230;]<\/p>\n<p><a class=\"btn btn-secondary understrap-read-more-link\" href=\"\/tutorials\/cron-job\">Read More&#8230;<\/a><\/p>\n","protected":false},"author":27,"featured_media":87036,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"rank_math_title":"Cron job: What it is and how to configure it in %currentyear%","rank_math_description":"A cron job is an automated task run by cron, a scheduling tool for Unix-like systems. Learn how cron jobs work and how to set them up.","rank_math_focus_keyword":"cron job","footnotes":""},"categories":[22644,22648],"tags":[],"class_list":["post-18211","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-vps","category-managing-monitoring-and-security"],"hreflangs":[{"locale":"en-US","link":"https:\/\/www.hostinger.com\/tutorials\/cron-job","default":0},{"locale":"pt-BR","link":"https:\/\/www.hostinger.com\/br\/tutoriais\/cron-job-guia","default":0},{"locale":"fr-FR","link":"https:\/\/www.hostinger.com\/fr\/tutoriels\/cron-job","default":0},{"locale":"es-ES","link":"https:\/\/www.hostinger.com\/es\/tutoriales\/cron-job","default":0},{"locale":"id-ID","link":"https:\/\/www.hostinger.com\/id\/tutorial\/cron-job","default":0},{"locale":"en-UK","link":"https:\/\/www.hostinger.com\/uk\/tutorials\/cron-job","default":0},{"locale":"en-MY","link":"https:\/\/www.hostinger.com\/my\/tutorials\/cron-job","default":0},{"locale":"en-PH","link":"https:\/\/www.hostinger.com\/ph\/tutorials\/cron-job","default":0},{"locale":"es-MX","link":"https:\/\/www.hostinger.com\/mx\/tutoriales\/cron-job","default":0},{"locale":"es-CO","link":"https:\/\/www.hostinger.com\/co\/tutoriales\/cron-job","default":0},{"locale":"es-AR","link":"https:\/\/www.hostinger.com\/ar\/tutoriales\/cron-job","default":0},{"locale":"pt-PT","link":"https:\/\/www.hostinger.com\/pt\/tutoriais\/cron-job-guia","default":0},{"locale":"en-IN","link":"https:\/\/www.hostinger.com\/in\/tutorials\/cron-job","default":0},{"locale":"en-CA","link":"https:\/\/www.hostinger.com\/ca\/tutorials\/cron-job","default":0},{"locale":"en-AU","link":"https:\/\/www.hostinger.com\/au\/tutorials\/cron-job","default":0},{"locale":"en-NG","link":"https:\/\/www.hostinger.com\/ng\/tutorials\/cron-job","default":0}],"_links":{"self":[{"href":"https:\/\/www.hostinger.com\/tutorials\/wp-json\/wp\/v2\/posts\/18211","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.hostinger.com\/tutorials\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.hostinger.com\/tutorials\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.hostinger.com\/tutorials\/wp-json\/wp\/v2\/users\/27"}],"replies":[{"embeddable":true,"href":"https:\/\/www.hostinger.com\/tutorials\/wp-json\/wp\/v2\/comments?post=18211"}],"version-history":[{"count":61,"href":"https:\/\/www.hostinger.com\/tutorials\/wp-json\/wp\/v2\/posts\/18211\/revisions"}],"predecessor-version":[{"id":137597,"href":"https:\/\/www.hostinger.com\/tutorials\/wp-json\/wp\/v2\/posts\/18211\/revisions\/137597"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.hostinger.com\/tutorials\/wp-json\/wp\/v2\/media\/87036"}],"wp:attachment":[{"href":"https:\/\/www.hostinger.com\/tutorials\/wp-json\/wp\/v2\/media?parent=18211"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.hostinger.com\/tutorials\/wp-json\/wp\/v2\/categories?post=18211"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.hostinger.com\/tutorials\/wp-json\/wp\/v2\/tags?post=18211"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}