Re: logger for cron job

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Robert Locke <lists <at> ralii.com> writes:

> 
> 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


Yes.  I don't understand the command which is specified at
<http://code.google.com/p/feed-on-feeds/>, though, in that why does it have some
strange URL in there?  Is that an example which I must customize, or is that
just how feeds-on-feeds work?  I've never used munitillo.com, but wouldn't know
what to replace it with.

At the moment, I have feeds-on-feeds in two places, which is redundant. 
However, I think that the cron jobs are setup to run, which is good.  That
they're generating error messages which are e-mailed to root is ok.

I'm thinking that the cronjob is setup with certain assumptions which don't work
on my system, fedora core six.


[thufir@localhost ~]$ 
[thufir@localhost ~]$ cat /etc/crontab 
SHELL=/bin/bash
PATH=/sbin:/bin:/usr/sbin:/usr/bin
MAILTO=root
HOME=/

# run-parts
01 * * * * root run-parts /etc/cron.hourly
02 4 * * * root run-parts /etc/cron.daily
22 4 * * 0 root run-parts /etc/cron.weekly
42 4 1 * * root run-parts /etc/cron.monthly


26 * * * * /usr/local/bin/GET http://minutillo.com/steve/fof/update-quiet.php |
logger -t NTP
[thufir@localhost ~]$ 
[thufir@localhost ~]$ 
[thufir@localhost ~]$ ll /etc/cron.hourly/
total 20
-rwxr-xr-x 1 root root  67 Apr 25 08:09 feeds-on-feeds
-rwxr-xr-x 1 root root 118 Aug 29  2006 inn-cron-nntpsend
-rwxr-xr-x 1 root root 118 Aug 29  2006 inn-cron-rnews
[thufir@localhost ~]$ 
[thufir@localhost ~]$ 
[thufir@localhost ~]$ cat /etc/cron.hourly/feeds-on-feeds 
/usr/local/bin/GET http://minutillo.com/steve/fof/update-quiet.php
[thufir@localhost ~]$ 
[thufir@localhost ~]$ ll /usr/local/bin/
total 120
-rwxr-xr-x 1 root root 44364 Apr 13 12:48 paperboy
-rwxr-xr-x 1 root root  3227 Apr 13 12:48 paperboy-config
-rwxr-xr-x 1 root root 56180 Apr 13 12:48 paperboyd
[thufir@localhost ~]$ 
[thufir@localhost ~]$ 
[thufir@localhost ~]$ ll /var/www/html/feedonfeeds-0.1.9/update-quiet.php
-rw-r--r-- 1 thufir thufir 566 Dec  5  2004
/var/www/html/feedonfeeds-0.1.9/update-quiet.php
[thufir@localhost ~]$ 
[thufir@localhost ~]$ date
Wed Apr 25 21:24:02 BST 2007
[thufir@localhost ~]$ 



  PINE 4.64   MESSAGE TEXT                                           Folder:
saved-messages  Message 1 of 95 ALL       

Date: Wed, 25 Apr 2007 21:01:01 +0100
From: Cron Daemon <root@xxxxxxxxxxxxxxxxxxxxx>
To: root@xxxxxxxxxxxxxxxxxxxxx
Subject: Cron <root@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: /usr/local/bin/GET: No such file or
directory



I think that I actually want to run
/var/www/html/feedonfeeds-0.1.9/update-quiet.php , not the /usr/local/... thing
which is specified in the documentation at feeds-on-feeds?  I suppose that
documentation presuposes that one understands cron jobs.


thanks,

Thufir













[Index of Archives]     [Current Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]     [Fedora Docs]

  Powered by Linux