[WBEL-users] Using cron for auto tasks

Joe Klemmer klemmerj@webtrek.com
Thu, 26 Feb 2004 10:48:28 -0500


On Thu, 2004-02-26 at 09:46, Sharon Kimble wrote:

> in /etc/cron.daily
> ========================
> # DO NOT EDIT THIS FILE - edit the master and reinstall.
> # (/tmp/croninit installed on Mon Feb 23 12:02:14 2004)
> # (Cron version -- $Id: crontab.c,v 2.13 1994/01/17 03:20:37 vixie Exp
> $) MAILTO=""
> LANG="en_UK"
> 0 0 7 * * /usr/local/bin/sylpheed
> ========================
> and called 'boztu.cron'
> 
> In the morning I read in my Cron-parts email ...
> /etc/cron.daily/boztu.cron:/etc/cron.daily/boztu.cron: line 6: 0:
> command not found
> 
> and it hasn't run. The permissions on boztu.cron are rwxr-xr-x with the
> owner and group being both boztu.
> 
> Why doesn't it run please, and what do I need to do to get it to run
> please?

	You are confusing cron commands with running a shell script. If you put
a script in /etc/cron.* to run it needs to be a normal script.  In the
example you have the script boztu.cron should look like this -

#! /bin/bash
/usr/local/bin/sylpheed

	This, if put in /etc/cron.daily, will run every day at around midnight
(I can't remember exactly the time it's set to run).

	What it looks like you want to do is to add an entry in your crontab
file for your user.  To do this you need to run the command crontab -e
and then add the line -

0 0 7 * * /usr/local/bin/sylpheed

to that file.  However, the above line says to run sylpheed at midnight
on Sunday only.  To do what I believe you want you need to put something
more like this in -

0 7 * * * /usr/local/bin/sylpheed

This line will run sylpheed every day at 7am.

Hope this helps,
Joe

-- 
Kuramarujo - http://www.webtrek.com/~klemmerj/sumo.html