Did you know LQ has a Linux Hardware Compatibility List?
Go Back > Forums > Linux Forums > Linux - Software
User Name
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.


LinkBack Search this Thread
Old 04-01-2011, 08:58 AM   #1
Registered: Oct 2010
Distribution: Arch
Posts: 136

Rep: Reputation: 7
Angry is my crontab crazy ?!

see what i mean by the title.
when i put the following code in my cronjob via the command cronjob -e (from my user), it get it and everything works great.
16 15 * * * /bin/mount /dev/sdb2 && /usr/bin/rsync -r -t -v --progress --delete --size-only /home/hanan/Programs /home/hanan/Backup/Programs && /bin/umount /dev/sdb2
the thing to point your eye on is the time.
and when i am trying to put another time in it like that:
16 57 * * * /bin/mount /dev/sdb2 && /usr/bin/rsync -r -t -v --progress --delete --size-only /home/hanan/Programs /home/hanan/Backup/Programs && /bin/umount /dev/sdb2
it won't let me to save that, and give me the following error:
crontab: installing new crontab
"/tmp/crontab.cxyC4J/crontab":2: bad hour
errors in crontab file, can't install.
Do you want to retry the same edit? (y/n)
what do you think ha ?

Old 04-01-2011, 09:00 AM   #2
Senior Member
Registered: Aug 2006
Distribution: Arch 2014.02.01
Posts: 2,317
Blog Entries: 1

Rep: Reputation: 741Reputation: 741Reputation: 741Reputation: 741Reputation: 741Reputation: 741Reputation: 741
Because there are only 24 hours in a day. 57 is out of range.
Old 04-01-2011, 09:00 AM   #3
Senior Member
Registered: May 2006
Location: USA
Distribution: Debian
Posts: 4,570

Rep: Reputation: 510Reputation: 510Reputation: 510Reputation: 510Reputation: 510Reputation: 510
No, crontab is correct. Hour 57 doesn't exist. The format is

# minute hour  day-of-month month day-of-week   command
If you want the job to fire at 4:57 PM, you need: 57 16 * * * /bin/mount/etc
Old 04-01-2011, 09:27 AM   #4
Registered: Oct 2010
Distribution: Arch
Posts: 136

Original Poster
Rep: Reputation: 7
well, thank you guys, i have totally forgot about that, the first one is the minutes .



crontab, time

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
replaced crontab, now should get crontab back to what it was raminn Linux - Newbie 2 10-20-2008 07:15 PM
Going crazy with crazy contact lenses puffaddering Linux - Certification 1 07-29-2007 08:42 PM
system-wide crontab in /etc/crontab ner Linux - General 2 11-18-2003 12:35 PM

All times are GMT -5. The time now is 03:29 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration