logger for cron job
Robert Locke
lists at ralii.com
Wed Apr 25 12:58:06 UTC 2007
On Wed, 2007-04-25 at 08:45 +0000, Thufir wrote:
> In a sense, this was what I was after: confirmation. So, the command is not
> found. which command? feeds-on-feeds isn't really a command.
>
>
> PINE 4.64 MESSAGE TEXT
> Folder: INBOX Message 8 of 90 ALL
>
> Date: Wed, 25 Apr 2007 03:01:01 +0100
> From: Cron Daemon <root at localhost.localdomain>
> To: root at localhost.localdomain
> Subject: Cron <root at localhost> run-parts /etc/cron.hourly
>
> [ The following text is in the "UTF-8" character set. ]
> [ Your display is set for the "ISO-8859-1" character set. ]
> [ Some characters may be displayed incorrectly. ]
>
> /etc/cron.hourly/feeds-on-feeds:
>
> /etc/cron.hourly/feeds-on-feeds: line 1: 50: command not found
>
I think I missed the first part of this thread, but I think we might be
confused on what you are filling in where.
First, /etc/crontab points to the four
directories, /etc/cron.{hourly,daily,weekly,monthly}/. It is
the /etc/crontab file that would have the format of '50 * * * * username
command', not the file in /etc/cron.hourly/. What is contained in that
directory is simply the script or executable that you want to see run
once an hour. By default, the stuff in the
directory, /etc/cron.hourly/, automatically runs at one minute past the
hour of each hour.
Now, if you want to have something run hourly on a different schedule,
you have two options:
Create a file in /etc/cron.d/ that has the 'minute hour dayofmonth month
dayofweek username command' or, as a user that is going to security wise
need to run the command, you can run 'crontab -e' to add a line to the
user's personal crontab that has a similar format 'minute hour
dayofmonth month dayofweek command'. Note that it is missing 'username'
in the second case. In either event, do not put the script
in /etc/cron.hourly/ as that stuff will run automatically at one minute
past the hour.
Does that help explain why you are getting the '50' being a command not
found?
--Rob
More information about the users
mailing list