On 2013-05-16 21:41, dd wrote:
>
>> man crontab
>
> hmmmmmm…after looking at that i have decided i have probably never
> originated a cron job, instead just edited some existing system ones
> (like logrotate) as i needed…(with mc)…and, of course all of those
> are in /etc and owned and executed by root…
>
> i can’t off-hand think of a good use for user cron … hmmmm.
There are 
User’s cronjobs (including root’s) go into “/var/spool/cron/tabs/”.
The /etc/crontab file is different, it is called “the system crontab”.
There is another location that is “/etc/cron.d/” with a slightly
different syntax (it specifies the user that each line is executed as).
Why would you have a crontab as user? For example, to generate a
different background for your desktop periodically, for your own
session. To send periodic emails, do backup tars of your documents… I
have one to speak the time at half hour intervals.
It is a (discretionary) power given to users (it can be disabled).
Another tool is the command “at”, to run a specified command(s) at a
certain time, just that once. For example:
at -f ~/bin/givewarning "now + 10m"
would ring a scandalous bell in ten minutes:
cer@Telcontar:~> cat ~/bin/givewarning
#!/bin/sh
/usr/bin/play /usr/share/sounds/wav/churbell.wav
I use “at” as root, for example, if I leave the computer doing a long
task and I go away, to hibernate it in 3 hours time, so that it is not
using electricity till I come back.
–
Cheers / Saludos,
Carlos E. R.
(from 12.1 x86_64 “Asparagus” at Telcontar)