Re: crontab Qs



pemo <usenetmeister@xxxxxxxxx> wrote:
How can I setup two crontab jobs - one to run daily and one to run weekly?

Since you already know how to do it daily, here's just the pattern
for a weekly job:

35 11 * * 5 /do/this/job

The first two fields are the minutes and hours, the fifth is the day
of the week (0 (or 7) is Sunday, 1 is Monday etc.) So this job would
get started on every Friday at 11:35 pm.

I've had a daily one for sometime - it 'monitors' web pages I'm interested
in, and emails me a diff when pages change. However, as some of these pages
change a bit too frequently, I'd like to move some of them into a 'check
monthly' list.

When I set up the current job, I created a mycrontab file ...

00 10 * * * $HOME/runReports.pl
00 17 * * * $HOME/runReports.pl

I also ran some kind of 'hey cron - watch this lot' command that I now
cannot remember, but I seem to recall that it 'registered' this file with
cron???

So anyhow, I'd now like to add a monthly job ...

00 10 * * * $HOME/runReports.pl
00 17 * * * $HOME/runReports.pl
00 00 01 * * $HOME/runReportsWk.pl

runReportsWk.pl should run on 1st of every month.

Use the command "crontab -l' to list what jobs cron is already
doing for you and "crontab -e" to edit that list (set the
EDITOR environment variable to your editor of choice) - that's
all it needs. And what you plan to put into it looks ok.

Regards, Jens
--
\ Jens Thoms Toerring ___ jt@xxxxxxxxxxx
\__________________________ http://toerring.de
.