If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Data Access, Manipulation & Batch Languages > Unix Shell Scripts > Crontab Error

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 11-19-03, 00:57
latief latief is offline
Registered User
 
Join Date: Oct 2003
Location: Abu Dhabi
Posts: 14
Crontab Error

I schedule the jobs in crontab as shown below

30,0,0 15,19,23 * * * /../XXX > XX.log 2>/dev/null
30,0,0 16,20,22 * * * /../YYY > YY.log 2>/dev/null

I want to run the first job at 15.30,19.00&23.00 and second job 16.30,20.00 & 22.00 as per the above parameter but its running in dirrerent ways like
first job: 15.00,15.30,19.00,19.30,23.00&23.30
second job: 16.00,16.30,20.00,20.30,22.00&22.30

Its generating mail ubject : Your crontab file has an error in it
Content-Length: 1080
unexpected end of line
This entry has been ignored.

Please anybody put light on my issue.

Thanks
Reply With Quote
  #2 (permalink)  
Old 11-19-03, 09:27
gurey gurey is offline
Registered User
 
Join Date: Aug 2003
Location: Argentina
Posts: 780
Re: Crontab Error

Quote:
Originally posted by latief
I schedule the jobs in crontab as shown below

30,0,0 15,19,23 * * * /../XXX > XX.log 2>/dev/null
30,0,0 16,20,22 * * * /../YYY > YY.log 2>/dev/null

I want to run the first job at 15.30,19.00&23.00 and second job 16.30,20.00 & 22.00 as per the above parameter but its running in dirrerent ways like
first job: 15.00,15.30,19.00,19.30,23.00&23.30
second job: 16.00,16.30,20.00,20.30,22.00&22.30

Its generating mail ubject : Your crontab file has an error in it
Content-Length: 1080
unexpected end of line
This entry has been ignored.

Please anybody put light on my issue.

Thanks
Hi,

Please check this form:

30 15 * * * /../XXX 1>XX.log 2>/dev/null
0 19,23 * * * /../XXX 1>XX.log 2>/dev/null
30 16 * * * /../YYY 1>YY.log 2>/dev/null
0 20,22 * * * /../YYY 1>YY.log 2>/dev/null

Gustavo.
Reply With Quote
  #3 (permalink)  
Old 11-20-03, 00:09
latief latief is offline
Registered User
 
Join Date: Oct 2003
Location: Abu Dhabi
Posts: 14
Re: Crontab Error

Quote:
Originally posted by gurey
Hi,

Please check this form:

30 15 * * * /../XXX 1>XX.log 2>/dev/null
0 19,23 * * * /../XXX 1>XX.log 2>/dev/null
30 16 * * * /../YYY 1>YY.log 2>/dev/null
0 20,22 * * * /../YYY 1>YY.log 2>/dev/null

Gustavo.
Thanks Gustavo,
I will be try as you mention above,
when crontab is run its generate unix mail which shown below

"unexpected end of line
This entry has been ignored"

Thanks
Reply With Quote
  #4 (permalink)  
Old 11-20-03, 00:32
rk_rachuri rk_rachuri is offline
Registered User
 
Join Date: Apr 2003
Posts: 50
Smile Re: Crontab Error

I think the format is wrong... check this way

30 15 * * * /../XXX 1>XX.log 2>/dev/null


Quote:
Originally posted by latief
I schedule the jobs in crontab as shown below

30,0,0 15,19,23 * * * /../XXX > XX.log 2>/dev/null
30,0,0 16,20,22 * * * /../YYY > YY.log 2>/dev/null

I want to run the first job at 15.30,19.00&23.00 and second job 16.30,20.00 & 22.00 as per the above parameter but its running in dirrerent ways like
first job: 15.00,15.30,19.00,19.30,23.00&23.30
second job: 16.00,16.30,20.00,20.30,22.00&22.30

Its generating mail ubject : Your crontab file has an error in it
Content-Length: 1080
unexpected end of line
This entry has been ignored.

Please anybody put light on my issue.

Thanks
__________________
Thanks and Regards
Ram
Reply With Quote
  #5 (permalink)  
Old 11-20-03, 07:53
gurey gurey is offline
Registered User
 
Join Date: Aug 2003
Location: Argentina
Posts: 780
Re: Crontab Error

Quote:
Originally posted by latief
Thanks Gustavo,
I will be try as you mention above,
when crontab is run its generate unix mail which shown below

"unexpected end of line
This entry has been ignored"

Thanks
Hi,

Can be that the error this in the script ?

Gustavo.
Reply With Quote
  #6 (permalink)  
Old 11-21-03, 18:22
hacker hacker is offline
Registered User
 
Join Date: Oct 2003
Posts: 18
Re: Crontab Error

Remove any empty lines in the crontab, those are not allowed.

The first field tells the minutes, the second means hours. If you want something to run at 15.30 and 16.00 everyday, you can't say

30,0 15,16 * * * script

then it will run at 15.00, 15.30, 16.00 and 16.30 - e.g all combinations of hours and minutes will be used. Do it like gustavo suggested, split it on several lines.

Now that I think about it, the minutes spec could also perhaps be causing an error. You have:

30,0,0 15,19,23 * * * /../XXX > XX.log 2>/dev/null

With this you're telling cron to run your script at 15.30, 15.00 and 15.00, since you repeat the 0 minute figure.

/Hacker
Reply With Quote
  #7 (permalink)  
Old 11-23-03, 01:01
latief latief is offline
Registered User
 
Join Date: Oct 2003
Location: Abu Dhabi
Posts: 14
Re: Crontab Error

Quote:
Originally posted by gurey
Hi,

Can be that the error this in the script ?

Gustavo.
Hi Gustavo,

Now ist working fine ,

thanks you
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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 On
Pingbacks are On
Refbacks are On