[Nelug] Cron results

Sean Kelly lists at shortestpath.org
Fri Sep 19 14:47:00 UTC 2003


Quoting Andrew Hatch <andrew.hatch at bluespace.com>:

> The next step is that I'd like the script to execute
> at a specified time (e.g. 10pm) and for the STDOUT of the script to be
> e-mailed on completion of the script.  If anyone has any hints or tips,
> I'd appreciate it.

  Then, as your subject line seems to indicate, you should be using cron.  
man cron.  man crontab.  man 5 crontab.  It's all in there.

  Any output of a cron'ed command will automatically be emailed to the user 
account that the crontab belongs to.  To mail it to someone else you should 
pipe the command into mail/mailx/qmail-inject/whatever and have that mail 
the output.  Normally it's just something like mail user at domain.name.com 
with the -s switch being used to specify a subject.

  Good luck,

-- 
Sean Kelly <lists at shortestpath.org>




More information about the Nelug mailing list