{
    "mode": "man",
    "parameter": "cron",
    "section": "8",
    "url": "https://www.chedong.com/phpMan.php/man/cron/8/json",
    "generated": "2026-10-04T16:00:25Z",
    "synopsis": "cron [-f] [-l] [-L loglevel] [-n fqdn] [-x debugflags]\ncron [-N]",
    "sections": {
        "NAME": {
            "content": "cron - daemon to execute scheduled commands (Vixie Cron)\n",
            "subsections": []
        },
        "SYNOPSIS": {
            "content": "cron [-f] [-l] [-L loglevel] [-n fqdn] [-x debugflags]\n\ncron [-N]\n",
            "subsections": []
        },
        "DESCRIPTION": {
            "content": "cron is started automatically from /etc/init.d on entering multi-user runlevels.\n",
            "subsections": []
        },
        "OPTIONS": {
            "content": "",
            "subsections": [
                {
                    "name": "-f",
                    "content": "",
                    "flag": "-f"
                },
                {
                    "name": "-P",
                    "content": "",
                    "flag": "-P"
                },
                {
                    "name": "-l",
                    "content": "affect the parsing of files under /etc/cron.hourly, /etc/cron.daily, /etc/cron.weekly\nor /etc/cron.monthly.\n",
                    "flag": "-l"
                },
                {
                    "name": "-n",
                    "content": "the hostname.\n",
                    "flag": "-n"
                },
                {
                    "name": "-N",
                    "content": "",
                    "flag": "-N"
                },
                {
                    "name": "-L loglevel",
                    "content": "Tell cron what to log about jobs (errors are logged regardless of this value) as  the\nsum of the following values:\n\n1      will log the start of all cron jobs\n\n2      will log the end of all cron jobs\n\n4      will log all failed jobs (exit status != 0)\n\n8      will log the process number of all cron jobs\n\nThe  default is to log the start of all jobs (1).  Logging will be disabled if levels\nis set to zero (0).  A value of fifteen (15) will select all options.\n",
                    "flag": "-L"
                },
                {
                    "name": "-x debugflags",
                    "content": "Tell cron to be more verbose and output debugging information; debugflags is the  sum\nof those values:\n\n1      \"ext\": ...\n\n2      \"sch\": ...\n\n4      \"proc\": ...\n\n8      \"pars\": ...\n\n16     \"load\": ...\n\n32     \"misc\": ...\n\n64     \"test\": ...\n\n128    \"bit\": ...\n",
                    "flag": "-x"
                }
            ]
        },
        "NOTES": {
            "content": "cron  searches  its  spool area (/var/spool/cron/crontabs) for crontab files (which are named\nafter accounts in /etc/passwd); crontabs found are loaded into memory.  Note that crontabs in\nthis directory should not be accessed directly - the crontab command should be used to access\nand update them.\n\ncron also reads /etc/crontab, which is in a slightly different format (see  crontab(5)).   In\nDebian,  the  content  of  /etc/crontab is predefined to run programs under /etc/cron.hourly,\n/etc/cron.daily, /etc/cron.weekly and /etc/cron.monthly.  This configuration is  specific  to\nDebian, see the note under DEBIAN SPECIFIC below.\n\nAdditionally,  in Debian, cron reads the files in the /etc/cron.d directory.  cron treats the\nfiles in /etc/cron.d as in the same way as the /etc/crontab file  (they  follow  the  special\nformat  of  that  file,  i.e. they include the user field).  However, they are independent of\n/etc/crontab: they do not, for example, inherit environment variable settings from it.   This\nchange is specific to Debian see the note under DEBIAN SPECIFIC below.\n\nLike  /etc/crontab,  the  files  in the /etc/cron.d directory are monitored for changes.  The\nsystem administrator may create cron jobs in /etc/cron.d/ with file  names  like  \"local\"  or\n\"local-foo\".\n\n\n/etc/crontab  and  the  files in /etc/cron.d must be owned by root, and must not be group- or\nother-writable.  In contrast to the spool area, the files under /etc/cron.d or the files  un‐\nder  /etc/cron.hourly,  /etc/cron.daily,  /etc/cron.weekly  and /etc/cron.monthly may also be\nsymlinks, provided that both the symlink and the file it points to are owned  by  root.   The\nfiles under /etc/cron.d do not need to be executable, while the files under /etc/cron.hourly,\n/etc/cron.daily, /etc/cron.weekly and /etc/cron.monthly do, as they are run by run-parts (see\nrun-parts(8) for more information).\n\ncron  then wakes up every minute, examining all stored crontabs, checking each command to see\nif it should be run in the current minute.  When executing commands, any output is mailed  to\nthe  owner  of  the  crontab  (or to the user named in the MAILTO environment variable in the\ncrontab, if such exists) from the owner of the crontab (or from the email  address  given  in\nthe  MAILFROM  environment  variable in the crontab, if such exists).  The children copies of\ncron running these processes have their name coerced to uppercase, as will  be  seen  in  the\nsyslog and ps output.\n\nAdditionally, cron checks each minute to see if its spool directory's modtime (or the modtime\non  the  /etc/crontab file) has changed, and if it has, cron will then examine the modtime on\nall crontabs and reload those which have changed.  Thus cron need not be restarted whenever a\ncrontab file is modified.  Note that the crontab(1) command updates the modtime of the  spool\ndirectory whenever it changes a crontab.\n\nSpecial  considerations  exist when the clock is changed by less than 3 hours, for example at\nthe beginning and end of daylight savings time.  If the time has moved forwards,  those  jobs\nwhich  would  have  run in the time that was skipped will be run soon after the change.  Con‐\nversely, if the time has moved backwards by less than 3 hours, those jobs that fall into  the\nrepeated time will not be re-run.\n\nOnly  jobs  that run at a particular time (not specified as @hourly, nor with '*' in the hour\nor minute specifier) are affected.  Jobs which are specified with wildcards are run based  on\nthe new time immediately.\n\nClock changes of more than 3 hours are considered to be corrections to the clock, and the new\ntime is used immediately.\n\ncron  logs  its action to the syslog facility 'cron', and logging may be controlled using the\nstandard syslogd(8) facility.\n",
            "subsections": []
        },
        "ENVIRONMENT": {
            "content": "If configured in /etc/default/cron in Debian systems, the cron daemon  localisation  settings\nenvironment can be managed through the use of /etc/environment or through the use of /etc/de‐\nfault/locale  with values from the latter overriding values from the former.  These files are\nread and they will be used to setup the LANG, LCALL,  and  LCCTYPE  environment  variables.\nThese variables are then used to set the charset of mails, which defaults to 'C'.\n\nThis  does  NOT  affect the environment of tasks running under cron.  For more information on\nhow to modify the environment of tasks, consult crontab(5).\n\nThe daemon will use, if present, the definition from /etc/localtime for the timezone.\n\nThe environment can be redefined in user's crontab definitions  but  cron  will  only  handle\ntasks in a single timezone.\n\n",
            "subsections": []
        },
        "DEBIAN SPECIFIC": {
            "content": "Debian introduces some changes to cron that were not originally available upstream.  The most\nsignificant changes introduced are:\n\n\n—      Support for /etc/cron.{hourly,daily,weekly,monthly} via /etc/crontab,\n\n—      Support for /etc/cron.d (drop-in dir for package crontabs),\n\n—      PAM support,\n\n—      SELinux support,\n\n—      auditlog support,\n\n—      DST and other time-related changes/fixes,\n\n—      SGID crontab(1) instead of SUID root,\n\n—      Debian-specific file locations and commands,\n\n—      Debian-specific configuration (/etc/default/cron),\n\n—      numerous other smaller features and fixes.\n\n\nSupport for /etc/cron.hourly, /etc/cron.daily, /etc/cron.weekly and /etc/cron.monthly is pro‐\nvided in Debian through the default setting of the /etc/crontab file (see the system-wide ex‐\nample  in  crontab(5)).  The default system-wide crontab contains four tasks: run every hour,\nevery day, every week and every month.  Each of these tasks will execute run-parts  providing\neach one of the directories as an argument.  These tasks are disabled if anacron is installed\n(except for the hourly task) to prevent conflicts between both daemons.\n\nAs described above, the files under these directories have to pass some sanity checks includ‐\ning the following: be executable, be owned by root, not be writable by group or other and, if\nsymlinks,  point  to  files  owned by root.  Additionally, the file names must conform to the\nfilename requirements of run-parts: they must be entirely made up of letters, digits and  can\nonly  contain  the special signs underscores ('') and hyphens ('-').  Any file that does not\nconform to these requirements will not be executed by run-parts.  For example, any file  con‐\ntaining  dots  will  be  ignored.  This is done to prevent cron from running any of the files\nthat are left by the Debian package management system when handling files in /etc/cron.d/  as\nconfiguration files (i.e. files ending in .dpkg-dist, .dpkg-orig, .dpkg-old, and .dpkg-new).\n\nThis  feature can be used by system administrators and packages to include tasks that will be\nrun at defined intervals.  Files created by packages in these directories should be named af‐\nter the package that supplies them.\n\n\nSupport for /etc/cron.d is included in the cron daemon itself, which handles this location as\nthe system-wide crontab spool.  This directory can contain any file defining tasks  following\nthe  format  used  in /etc/crontab, i.e. unlike the user cron spool, these files must provide\nthe username to run the task as in the task definition.\n\nFiles in this directory have to be owned by root, do not need to be executable (they are con‐\nfiguration files, just like /etc/crontab) and must conform to the same naming  convention  as\nused by run-parts(8) : they must consist solely of upper- and lower-case letters, digits, un‐\nderscores,  and  hyphens.  This means that they cannot contain any dots.  If the -l option is\nspecified to cron (this option can be setup through /etc/default/cron, see below), then  they\nmust  conform  to  the  LSB namespace specification, exactly as in the --lsbsysinit option in\nrun-parts.\n\nThe intended purpose of this feature is to allow packages that require finer control of their\nscheduling than the /etc/cron.{hourly,daily,weekly,monthly} directories to add a crontab file\nto /etc/cron.d.  Such files should be named after the package that supplies them.\n\n\nAlso, the default configuration of cron is controlled by /etc/default/cron which is  read  by\nthe init.d script that launches the cron daemon.  This file determines whether cron will read\nthe  system's  environment  variables  and makes it possible to add additional options to the\ncron program before it is executed, either to configure its logging or to define how it  will\ntreat the files under /etc/cron.d.\n\n",
            "subsections": []
        },
        "SEE ALSO": {
            "content": "crontab(1), crontab(5), run-parts(8)\n",
            "subsections": []
        },
        "AUTHOR": {
            "content": "Paul  Vixie  <paul@vix.com>  is  the author of cron and original creator of this manual page.\nThis page has also been modified for Debian by Steve Greenland, Javier Fernandez-Sanguino and\nChristian Kastner.\n\n\n4th Berkeley Distribution                   19 April 2010                                    CRON(8)",
            "subsections": []
        }
    },
    "summary": "cron - daemon to execute scheduled commands (Vixie Cron)",
    "flags": [
        {
            "flag": "-f",
            "long": null,
            "arg": null,
            "description": ""
        },
        {
            "flag": "-P",
            "long": null,
            "arg": null,
            "description": ""
        },
        {
            "flag": "-l",
            "long": null,
            "arg": null,
            "description": "affect the parsing of files under /etc/cron.hourly, /etc/cron.daily, /etc/cron.weekly or /etc/cron.monthly."
        },
        {
            "flag": "-n",
            "long": null,
            "arg": null,
            "description": "the hostname."
        },
        {
            "flag": "-N",
            "long": null,
            "arg": null,
            "description": ""
        },
        {
            "flag": "-L",
            "long": null,
            "arg": null,
            "description": "Tell cron what to log about jobs (errors are logged regardless of this value) as the sum of the following values: 1 will log the start of all cron jobs 2 will log the end of all cron jobs 4 will log all failed jobs (exit status != 0) 8 will log the process number of all cron jobs The default is to log the start of all jobs (1). Logging will be disabled if levels is set to zero (0). A value of fifteen (15) will select all options."
        },
        {
            "flag": "-x",
            "long": null,
            "arg": null,
            "description": "Tell cron to be more verbose and output debugging information; debugflags is the sum of those values: 1 \"ext\": ... 2 \"sch\": ... 4 \"proc\": ... 8 \"pars\": ... 16 \"load\": ... 32 \"misc\": ... 64 \"test\": ... 128 \"bit\": ..."
        }
    ],
    "examples": [],
    "see_also": [
        {
            "name": "crontab",
            "section": "1",
            "url": "https://www.chedong.com/phpMan.php/man/crontab/1/json"
        },
        {
            "name": "crontab",
            "section": "5",
            "url": "https://www.chedong.com/phpMan.php/man/crontab/5/json"
        },
        {
            "name": "run-parts",
            "section": "8",
            "url": "https://www.chedong.com/phpMan.php/man/run-parts/8/json"
        }
    ]
}