On Debian and its derivatives, how shall we understand the following seemingly contradictory facts:
/etc/crontab
and/etc/cron.d/*
have a user field, meaning that a job is running as the user (either root or nonroot).the jobs in
/etc/crontab
and/etc/cron.d/*
are system jobs not user-specific jobs?
If you want to run a job either as root or as a nonroot user, where would you add the job: /etc/crontab
, /etc/cron.d/*
, or /var/spool/cron/crontab/<user>
?
Stephen's comment at How are files under /etc/cron.d used? clarifies a lot, but I still can't figure that out
A system job is a job which applies to the whole system. A user-specific job is a job run on behalf of a specific user; typically, tasks which the user would do manually while logged in, but which he/she wishes to perform periodically and automatically — e.g. backups of specific files, or refreshes of remote development repositories, or mail processing, or mirroring web sites
Thanks.