Hi, I have to setup a scheduled task on a server, and I just read through some crontab docs. Now I'm confused. It's not so much the syntax of the cron job to define (I got that), it's more... how do I get to define it? Use a text editor (vi or the likes) to edit /etc/crontab directly? Or create some empty file in /etc/cron.daily or /etc/cron.hourly or the likes and then edit it using crontab -e ? Anyway, here's what I'd like to do. I have a script: /root/scripts/backup.sh I want to run that script every day at 07:00 in the morning. Once. Now how would I go about that? The thing is: I'd like to know an orthodox way to go about this. You can be laconic in your answers, I'll retrive the details in the docs. Cheers, Niki
On Sun, Oct 18, 2009 at 16:09, Niki Kovacs <contact at kikinovak.net> wrote:> Hi, > > I have to setup a scheduled task on a server, and I just read through > some crontab docs. Now I'm confused. It's not so much the syntax of the > cron job to define (I got that), it's more... how do I get to define it? > Use a text editor (vi or the likes) to edit /etc/crontab directly? Or > create some empty file in /etc/cron.daily or /etc/cron.hourly or the > likes and then edit it using crontab -e ?As root, crontab -e. This is all you need. ne... -- Registered Linux User # 125653 (http://counter.li.org) Now accepting personal mail for GMail invites. Mike Ditka - "If God had wanted man to play soccer, he wouldn't have given us arms." - http://www.brainyquote.com/quotes/authors/m/mike_ditka.html
> how would I go about that? The thing is: I'd like to know an orthodox > way to go about this.crontab -e and then just put in your entry * 7 * * * /your/command -- ?Don't eat anything you've ever seen advertised on TV? - Michael Pollan, author of "In Defense of Food"