I've been trying to figure out the differences between crontab and at, and
I've come up with the following. Are these accurate and is there anything
I'm missing? Thanks much.
1. at is a one-shot scheduler - you schedule a job to be run at one time only.
(you can have scripts reschedule themselves automatically, but this is
"invisible" - there's no way to easily find out the scripts that do this).
crontab is a regular scheduler - you can schedule a job to be run at almost
any interval.
2. at makes a copy of your script as it exists when scheduled; if you change
your script after scheduling, you have to delete the previous job and
reschedule to get your modified script in the queue.
crontab runs the command line you specify, so if you modify your script
after scheduling a job, the modified script is automatically run.
3. at can run only scripts without any command line arguments.
crontab can almost anything that's run at the command line.
4. at cannot easily receive input from STDIN
crontab can pass information to scripts from STDIN
5. at makes a copy of most of your environment as it exists when scheduled.
crontab specifies a minimal environment, and if your scripts need more than
that, they have to supply it themselves.
6. at uses the 'a' queue by default, but you can specify another queue. The
'a' queue by default is limited to four simultaneous jobs.
crontab uses the 'c' queue always. The 'c' queue is not limited to any
number of simultaneous jobs by default, although cron can handle a
max of 100 simultaneous jobs among all queues.
7. at allows you to specify which shell you want to run your scripts.
crontab uses the Bourne shell (/bin/sh) always.
8. at jobs are scheduled one at a time. Scheduling one job does not affect
any other previously scheduled jobs.
crontab loads the entire list of scheduled jobs for your user ID. If you
*this up, you can*up all of other scheduled jobs.
--
John Switzer | "Scooby Doo, pronouncing Windex"
| - index entry for "rindex" in the book
| "Learning Perl" by Randal L. Schwartz,