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?
|
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. |
|||
|
|
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. |
|||
|
|
|
Also note that jobs in non-root crontabs will be executed as that user. Whereas in From
|
|||
|
|