
at 12:45which would give you plenty of time to get that information before the meeting. You will see the 'at' prompt:
warning: commands will be executed using /bin/sh
last > $HOME/log-ins; lp $HOME/log-inspress 'Enter' and then 'Ctl + d' and you will see the following:
job 15 at 2003-02-16 12:45Of course, your job number will vary with the number of times you've used 'at'.
atrm 15you will remove job 15 from the 'at' queue. To see what is in the 'at' queue, type:
atq
/etc/at.denycontrols who cannot use 'at'. That is to say, the users listed in at.deny cannot use it. You can also create an
/etc/at.allowfile. Creating at.allow makes the at daemon ignore the
/etc/at.deny
crontab -e
get my mail from mail.mydomain.comand expect it to work. The syntax in your crontab is not easy to master, but it is not excessively difficult to comprehend either. First, there are 5 time periods that cron looks for. You start your crontab entry with these. Here is the order and some examples:

30 3 * * 0 $HOME/bkup_scriptwhich runs a script in your home directory to back up your files at 3:30 AM on Sunday. If you entered this into your crontab, you would simply save the file by pressing ESC + :wq which is a vi command. Vi is normally the editor that crontab uses by default, but you may use a text editor other than vi, by typing export VISUAL=pico, for example, which would allow you to use the pico editor. Every time you want to alter, add or delete an entry, you would first type
crontab -eEnter whatever it is that you want to get done and then type
ESC + :wq(or the combination of keys used to save a file in your particular text editor of choice). If you're curious about what's in your crontab file and want to list the jobs you have programmed, type:
crontab -lIf you want to delete your crontab file, type
crontab -r
0-59/1 * * * * $HOME/shutoff_cam >/dev/null 2>&1
0-59/1basically means that between the 0-59 minutes of every hour, at every 1 minute interval, the camera is to shut off. To show you how useful cron is, I remember seeing a James Bond movie where the perpetual bad-guy, Blofeld, was brainwashing girls to carry out biological attacks from a base in the Swiss Alps. He would play these hypnotic tapes to the girls every evening. There is one scene where you see Blofeld and one of his minions switching the tapes manually. If only they had had a Linux computer! They could have done this:
30-45/3 22 * * * mpg123 /home/esblofeld/brainwash_girls.mp3 >/dev/null 2>&1which would play the brain-washing instructions at 3 minute intervals between 10:30 and 10:45 PM.
command >/dev/null 2>&1We tacked this on the end because cron, by default, mails a "report" to you of the command you carried out. This is so you can either get the output directly in the mail, and/or to see if the command was successful. You may have made a mistake when you added an entry to your crontab (like typing the wrong path or the name of a command wrong). That way, you're notified and even if your job was important and you missed the first one, you can correct it and then you won't miss any others. Again, in the examples above, if we got a mail every time the command was carried out (every minute or couple of minutes), your in-box would quickly fill up with useless mail. Therefore, we tack that on so that cron will send notification of those jobs to /dev/null (ie. the trash).
0 0 15,30 * * cat /var/log/mysql.log > $HOME/mysql_use
/etc/cron.denyare not allowed to use cron and all other users are allowed. If you have a
/etc/cron.allowfile, this supersedes cron.deny (ie, cron.deny is ignored) and allows only those listed in it to use cron.