[Techtalk] Newbie & crontab

Carla Schroder carla at bratgrrl.com
Tue Nov 16 04:22:56 EST 2004


On Monday 15 November 2004 4:50 am, 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. 
> 
> I am using # crontab -u User -e to edit and it creates the crontab files  in 
> /var/spool/cron/User.
> 
> I was using the 3rd Edition of O'Reilly's Running Linux and using its 
examples 
> of a crontab format so I tried this:
> 
> crontab -l
> # DO NOT EDIT THIS FILE - edit the master and reinstall.
> # (/tmp/crontab.524 installed on Mon Nov 15 20:38:39 2004)
> # (Cron version -- $Id: crontab.c,v 2.13 1994/01/17 03:20:37 vixie Exp $)
> #TIVO Run mencoder script to record from TV.
> 
> 21 20 * * mon mencoder tv:// -tv driver=v4l:input=1:width=480:height=324 
-oac 
> copy -ovc copy -endpos 00:40:00 -o /home/Raena/TEMP/tvprogram.avi
> 
> 
> Then I had a look at the etc/crontab files and saw that the fomat was 
> different so I tried creating a root user crontab like this:
> 
> 
> # crontab -l
> # DO NOT EDIT THIS FILE - edit the master and reinstall.
> # (/tmp/crontab.1223 installed on Mon Nov 15 22:48:25 2004)
> # (Cron version -- $Id: crontab.c,v 2.13 1994/01/17 03:20:37 vixie Exp $)
> #TIVO Run mencoder script to record from TV.
> 
> 21 20 * * mon     root  mencoder tv:// -tv 
> driver=v4l:input=1:width=480:height=324 -oac copy -ovc copy -endpos 00:40:00 
> -o /home/Raena/TEMP/test.avi
> 

A couple of thoughts. First of all, when you use the crontab command, you 
don't name the user in the file. This is different from /etc/crontab, which 
you edit directly, and have to name the user. The cron documentation is 
really awful; it assumes you already know everything, so don't feel badly.

Did you test the command all by itself?

Make sure each line in your crontab ends with a newline. In other words, make 
sure the file ends with a blank line, or it will fail silently.

-- 
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Carla Schroder
this message brought to you
by Libranet 2.8 and Kmail
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~


More information about the Techtalk mailing list