[Techtalk] Newbie & crontab
Conor Daly
c.daly at met.ie
Tue Nov 16 00:03:01 EST 2004
On Mon, Nov 15, 2004 at 11:50:00PM +1100 or thereabouts, Raena Lea-Shannon wrote:
> Hi,
>
> I am trying to create a simple crontab to record from my TV card. I am
> struggling with getting cron to work. I have searched lots and am getting
> more confused. I am running SuSE 8.2. I have learnt so far that all its
> system cron deamon things are run set up in /etc/cron.blahs.
It's probably the traditional 'crontab doesn't get environment' problem.
Essentially, when you log in as a user, you get all your environment setup
like $PATH and various other stuff. Cron doesn't get these things set so
commands that 'work for me' fail for cron. I did a HOWTO for mondoarchive
on the subject at:
http://www.cod.utvinternet.com/documentation/mondo-with-cron/mondo-with-cron.html
It explains some of the problem and proposes a solution which you might be
able to adapt for your purposes.
In the meantime, to get you started:
Try creating a script with your command in it like this:
o echo "#!/bin/bash" > myscript
o echo $PATH >> myscript
o vi myscript
Now add your commands to the script and run this script from your crontab.
> Nothing happened :-(
Are you sure nothing happened? Did you (or root) get an email with output?
you should have. If you look in /etc/crontab you'll see the line
"MAILTO=root" which tells cron where to send any output.
Conor
--
Conor Daly, Please avoid sending me
Met Eireann, Glasnevin Hill, Word or PowerPoint attachments.
Dublin 9, Ireland http://www.fsf.org/philosophy/no-word-attachments.html
Ph +3531 8064276 Fax +3531 8064247
**********************************************************************
This e-mail and any files transmitted with it are confidential
and intended solely for the addressee. If you have received
this email in error please notify the sender.
This e-mail message has also been scanned for the
presence of computer viruses.
**********************************************************************
More information about the Techtalk
mailing list