[plug] Cron Jobs

Joel Fraser joel231 at yahoo.com
Thu Jul 11 15:55:22 WST 2002


What i was after was a cron job that would run webalizer ever night or
hour at sat 11:59pm or something like that but would also like to right
some other cron jobs and just basically fiddle around with it

Cheers Joel

--- Jason Nicholls <jason at mindsocket.com.au> wrote: > G'day,
> 
> On Wed, Jul 10, 2002 at 12:22:42PM -0400, Steege, Phil E wrote:
> > It is pretty easy using the crontab command.
> > 'crontab -l' will show the contents of your crontab file listing the
> > scheduled jobs.
> > 'crontab -e' will allow you to edit it.
> > 'man crontab' should be all you need.
> 
> I'm a little uncertain whether he was after help with setting cron jobs
> or
> writing scripts for cron to execute.
> 
> > > From: Joel Fraser [mailto:joel231 at yahoo.com] 
> > > I was wondering if anyone has a site that could help me with writing
> 
> > > cron jobs, as i havent done this before and need a little help with
> it.
> 
> What exactly are you trying to achieve, or just messing about?
> Here is simple example.
> 
> First a script, lets say it's in a file called "~/bin/simple.sh":
> 
> --------------------------------------------
> #!/bin/bash
> 
> echo "the time is" `date` >> ~/simple.output
> --------------------------------------------
> 
> Next up, a crontab entry (crontab -e):
> 
> --------------------------------------------
> # run at 30mins past the hour, every hour, every day, every month
> 30 * * * *      ~/bin/simple.sh
> --------------------------------------------
> 
> What we've done here is write a shell script to create output like:
> 
>     the time is Thu Jul 11 00:37:15 WST 2002
> 
> And have cron run this every hour. After a while the file would look
> like:
> 
>     the time is Thu Jul 11 00:30:00 WST 2002 
>     the time is Thu Jul 11 01:30:00 WST 2002 
>     the time is Thu Jul 11 02:30:00 WST 2002 
>     the time is Thu Jul 11 03:30:00 WST 2002 
>     the time is Thu Jul 11 04:30:00 WST 2002 
>     the time is Thu Jul 11 05:30:00 WST 2002 
> 
> 
> "man 5 crontab" for info on setting crontab entries.
> 
> 
> 
> Regards,
> 
> Jason Nicholls
> --------------------------------------------------------------------
> Jason Nicholls    icq: 11745841    email: <jason at mindsocket.com.au>
> http://jason.mindsocket.com.au/    mobile: 0417 410 811
> --------------------------------------------------------------------
>    pgp/gpg id: 0xC3844959  
>   fingerprint: 7F7A 5846 4E94 459C 104D  A979 7079 24CF C384 4959
>  

=====
// Joel Fraser
// E-mail: joel231 at yahoo.com
// Website: http://tuxette.ath.cx

http://www.sold.com.au - SOLD.com.au
- Find yourself a bargain!



More information about the plug mailing list