l i n u x - u s e r s - g r o u p - o f - d a v i s
L U G O D
 
Next Meeting:
July 21: Defensive computing: Information security for individuals
Next Installfest:
TBD
Latest News:
Jul. 4: July, August and September: Security, Photography and Programming for Kids
Page last updated:
2009 Sep 07 02:58

The following is an archive of a post made to our 'vox-tech mailing list' by one of its subscribers.

Report this post as spam:

(Enter your email address)
Re: [vox-tech] crontab
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [vox-tech] crontab



Hai Yi wrote:
> this might be too simple a question to ask, however i am doing it anyway.
> 
> i want to run a cron job to back up the dump files from my database
> tables on a weekly basis. I've never set a cron job before. So by
> following the "goolge-search" result, I did these:
> 
> I create a text file and add a line to set time, date and my script,
> name the file "cronjob.txt"
> 59 23 * * * /home/hai/Scripts/backup.sh
> 
> from CLI: crontab cronjob.txt
> confirm the job: crontab -l
> 
> then I sat tight waiting for the magic moment. Nothing happened.
> 
> I must have missed something, what is it?
> 
> I am using ubuntu 8.10, and I test the script manually, it works fine.
> 
> Thanks!
> Hai

On ubuntu boxes you'll find a folder /etc/cron.weekly
if you place a script in there is will be run weekly.

If you need to time it specifically you'll want to put your control file
that you have above into /etc/cron.d (Note this is system wide)

you also missed what day of week to execute on
59 23 * * 0
that would be sunday = 0 at the end there

Based on the method you used it should have run every night, maybe
there's a permissions error, as it would have run under your user since
you used the crontab command to set it. Try adding a log write to your
script so you can tell when it runs.
http://en.wikipedia.org/wiki/Cron

Alex
_______________________________________________
vox-tech mailing list
vox-tech@lists.lugod.org
http://lists.lugod.org/mailman/listinfo/vox-tech



LinkedIn
LUGOD Group on LinkedIn
Sign up for LUGOD event announcements
Your email address:
facebook
LUGOD Group on Facebook
'Like' LUGOD on Facebook:

Hosting provided by:
Sunset Systems
Sunset Systems offers preconfigured Linux systems, remote system administration and custom software development.

LUGOD: Linux Users' Group of Davis
PO Box 2082, Davis, CA 95617
Contact Us

LUGOD is a 501(c)7 non-profit organization
based in Davis, California
and serving the Sacramento area.
"Linux" is a trademark of Linus Torvalds.

Sponsored in part by:
Sunset Systems
Who graciously hosts our website & mailing lists!