Scheduling Commands with crontab
Use crontab to schedule commands to run at specified intervals.
Linux Journal is the premier source for how-tos, projects, product reviews, expert advice and opinions for everything Linux.
| We're Linux, Again | Feb 09, 2010 |
| Quick Compiz Screenshots | Feb 09, 2010 |
| Welcome to the New LinuxJournal.com | Feb 09, 2010 |
| Symbian Opens Up | Feb 04, 2010 |
| The Small Picture: More OpenOffice.org Extensions | Feb 04, 2010 |
| Pass the Bug, Collect $500 | Feb 02, 2010 |
This week 5 lucky Members will receive a copy of The Official Ubuntu Server Book by Benjamin Mako Hill and Linux Journal's very own Kyle Rankin. No entry necessary. Check back here early next week to find out who the lucky Online Members are.
Linux Journal, currently celebrating its 16th year of publication, is the original magazine of the global Linux community, delivering readers the advice and inspiration they need to get the most out of their Linux systems.
In-depth information provides a full 360-degree look at featured topics relating to Linux, giving a comprehensive source of everything readers need for creating and completing their own projects -- not just tools they will use today, but relevant and encompassing information they will turn to in future months and years. In addition to how-to content, Linux Journal includes opinions, new product information, profiles of leaders making major contributions in Open Source and product reviews. It also covers business, social and technical news and developments in order to fulfill its mission as the central forum and advocate for the greater Linux community throughout the world.

Comments
Cron issue
Need to schedule daily hot backup for Oracle Database.
I have followed the same proceure at all our clients, and the crontab works.
Wherein, at this client, the cron does not work.
When I run the command from ssh session, the backup completes successfully.
Is there any service which needs to be started at Linux level, etc in order for this schedule to run.
Looking forward to your help.
KAlarm
I use KAlarm which is a much better GUI based scheduler and alarm clock. I guess cron is useful if you need to save on memory and CPU.
cron writes output to your mail file
A useful thing to note is that if you do not redirect the stdout and/or stderr of your commands, any generated output or errors will be mailed to you.
You can look at your mail file (/var/mail/user) to see the output/errors of your commands.
This is true.
Very true, and I meant to mention it. Thanks for pointing it out. Especially with that -v flag in rsync. :D
Shawn Powers is an Associate Editor for Linux Journal. You might find him chatting on the IRC channel, or Twitter
Personally I like using
Personally I like using gnome schedule (http://gnome-schedule.sourceforge.net) as a frontend for cron. Easier to go with if you don't know what are you doing.
Post new comment