Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Is it just for controlling the permissions of the script being called or does it also effect when or if the script runs? I assume if I setup a cron for a non-root user it should always run, even if I haven't logged in as that user since reboot, right?

share|improve this question
up vote 7 down vote accepted

Remember that Unix was originally designed as a multi-user system, where multiple people were using the same physical computer. (Unlike today, where most Unix systems are used by only one person, and multiple user accounts are just to limit vulnerabilities.)

So the original reason for per-user crontabs was so that each person could schedule jobs they wanted run periodically (without giving them permissions to edit the system crontab, and thus interfere with other people's jobs). But now, it's primarily just to control the permissions of the jobs being run.

So yes, once a crontab is saved, the jobs will run whether or not that user is logged in (or has ever logged in). The main cron daemon runs the per-user crontabs as well as the system crontab.

share|improve this answer
Good point, if they were both editing the same system file that would be a headache. – ioSamurai May 10 '12 at 20:18

Also note that jobs in non-root crontabs will be executed as that user. Whereas in /etc/crontab and the /etc/cron.d, /etc/cron.daily etc. directories the system admin can select the user account the job will run as because it has an additional entry.

From man 5 crontab:

   The format of a cron command is very much the V7 standard,  with
   a  number  of  upward-compatible extensions.  Each line has five
   time and date fields, followed by a user name  if  this  is  the
   system  crontab  file, followed by a command.
share|improve this answer

Basically, it allows an unprivileged user to have cron jobs. And yes, you will want cron jobs if you want regular things done. And yes, it will persist across reboots.

at/batch provides similar facilities if you don't want "periodically forever" semantics.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.