[wplug] Cron Job - Working hours vs. Off hours

Kevin Squire gentgeen at linuxmail.org
Sun Sep 24 23:52:12 EDT 2006


Thanks.

The command will be fetchmail.  So if I want just the stderr added to the bottom
of a file I could do :

   /usr/bin/fetchmail 1>/dev/null 2>>/home/USER/fetchmail.log

would that be right?

I have only used fetchmail before on a system level, not a user level.  So I 
am not sure if the only logging would be stderr/stdout or if I could do the
logging conf. in my ~/.fetchmailrc file



On Sun, Sep 24, 2006 at 09:46:09PM -0400, Pat Barron wrote:
> In the second and third cron entries, you need to specify a specific
> minute in the hour for the command to run, otherwise it will run once per
> minute during those time periods.  You might also want to specify the full
> path to the command (just to avoid $PATH possibly not being what you
> expect it to be), and redirect the output of the command (both stdout and
> stderr) somewhere, otherwise any output will be mailed to the user to whom
> the crontab belongs.
> 
> --Pat.
> 
> 
> 
> On Sun, 24 Sep 2006, Gentgeen wrote:
> 
> >
> > I want to set up a cron job that will run "foo" every 5 minutes during 7
> > to 6 on weekdays, but run "foo" every hour the rest of the time.  Do I
> > have this right:
> >
> > --- BEGIN CRONTAB --------
> > # Runs every 5 minutes during working hours on weekdays
> > */5 7-18 * * 1-5 foo
> >
> > # Runs every hour during none working hours on weekdays
> > * 19-6 * * 1-5 foo
> >
> > # Runs every hour during weekends
> > * */1 * * 0,6 foo
> >
> > --- END CRONTAB ----------
> >
> >
> > Or is there maybe a more eloquent way to do this? (btw this is just a
> > user crontab, not a system wide cron (crontab -e as user not root)
> >
> >
> > --
> > http://gentgeen.homelinux.org
> >
> > #############################################################
> >  Associate yourself with men of good quality if you esteem
> >  your own reputation; for 'tis better to be alone then in bad
> >  company.        - George Washington, Rules of Civility
> > _______________________________________________
> > wplug mailing list
> > wplug at wplug.org
> > http://www.wplug.org/mailman/listinfo/wplug
> >
> 
> _______________________________________________
> wplug mailing list
> wplug at wplug.org
> http://www.wplug.org/mailman/listinfo/wplug
> 

-- 
http://gentgeen.homelinux.org

#############################################################
 Associate yourself with men of good quality if you esteem    
 your own reputation; for 'tis better to be alone then in bad 
 company.        - George Washington, Rules of Civility


More information about the wplug mailing list