Search Members Help

» Welcome Guest
[ Log In :: Register ]

Mini-ITX Boards Sale, Fanless BareBones Mini-ITX, Bootable 1G DSL USBs, 533MHz Fanless PC <-- SALE $200 each!
Get The Official Damn Small Linux Book. DSL Market , Great VPS hosting provided by Tektonic
Pages: (2) </ 1 [2] >/

[ Track this topic :: Email this topic :: Print this topic ]

reply to topic new topic new poll
Topic: cron problems, permission problems< Next Oldest | Next Newest >
lucky13 Offline





Group: Members
Posts: 1478
Joined: Feb. 2007
Posted: July 25 2007,18:57 QUOTE

Quote
Well Ok another dumb mistake. There are 6 fields for the time trigger and I only had 5 in crontab.

The only dumb mistakes are the ones you refuse to stop making. The rest are learning experiences. :)


--------------
"It felt kind of like having a pitbull terrier on my rear end."
-- meo (copyright(c)2008, all rights reserved)
Back to top
Profile PM WEB 
bpsg119 Offline





Group: Members
Posts: 13
Joined: May 2007
Posted: Oct. 08 2007,13:37 QUOTE

I feel like an idiot, but why does this script have 6 time fields when the cron only has 5?

I've added another * to the end of the other 5 and things seem to work from initial testing, but I haven't found documentation on the6th field.
Back to top
Profile PM 
roberts Offline





Group: Members
Posts: 4983
Joined: Oct. 2003
Posted: Oct. 08 2007,15:04 QUOTE

As shown in the perl script, /usr/local/bin/MyCron uses a slightly enhanced crontab

Code Sample
############################################################################
# This script reads /etc/crontab one line at a time and executes commands  
# in a manner similar to the real cron. Crontab entries are seven space    
# separated fields.  The first 6 fields are the time stuff (slightly      
# enhanced) and the remainder of the line is considered the command and    
# will be passed to the system (almost) as is for execution.              
# Crontab fields: MM HH DD MO WD YY <command>                      
# EG:   "32-46 15 12 5 * 2006 cmd"  (3:32pm to 3:46pm 12 May 2006)        
#       "10 8-17 * 5 * cmd"         (8:10am - 5:10pm everyday in May)  
#       "0 0/2 * * 6 cmd"      (every two hours, on the hour, on Saturday)  ############################################################################
Back to top
Profile PM WEB 
bpsg119 Offline





Group: Members
Posts: 13
Joined: May 2007
Posted: Oct. 08 2007,16:46 QUOTE

Quote (roberts @ Oct. 08 2007,11:04)
As shown in the perl script, /usr/local/bin/MyCron uses a slightly enhanced crontab

Code Sample
############################################################################
# This script reads /etc/crontab one line at a time and executes commands  
# in a manner similar to the real cron. Crontab entries are seven space    
# separated fields.  The first 6 fields are the time stuff (slightly      
# enhanced) and the remainder of the line is considered the command and    
# will be passed to the system (almost) as is for execution.              
# Crontab fields: MM HH DD MO WD YY <command>                      
# EG:   "32-46 15 12 5 * 2006 cmd"  (3:32pm to 3:46pm 12 May 2006)        
#       "10 8-17 * 5 * cmd"         (8:10am - 5:10pm everyday in May)  
#       "0 0/2 * * 6 cmd"      (every two hours, on the hour, on Saturday)  ############################################################################

Ok,thanks for that, I should have seen that when I was looking at the script while I was getting errors.

Correct me if I'm wrong, but it appears that the second and third examples in the text from the script that you posted only contain 5 fields before the command. If this is allowed, why would my old crontab with 5 fields throw an error until I entered the 6th field?

Thanks again for your help
Back to top
Profile PM 
roberts Offline





Group: Members
Posts: 4983
Joined: Oct. 2003
Posted: Oct. 08 2007,23:14 QUOTE

I didn't write the script. Just posted that comment section. But I would say you are correct. The only thing that I contributed was the sample test crontab


* * * * * * echo Cron timestamp `date` >> /tmp/crontest

Which has six.
Back to top
Profile PM WEB 
9 replies since July 25 2007,01:45 < Next Oldest | Next Newest >

[ Track this topic :: Email this topic :: Print this topic ]

Pages: (2) </ 1 [2] >/
reply to topic new topic new poll
Quick Reply: cron problems

Do you wish to enable your signature for this post?
Do you wish to enable emoticons for this post?
Track this topic
View All Emoticons
View iB Code