Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

crontab "end of line" error

Status
Not open for further replies.

tradntele

Programmer
Nov 7, 2001
14
US
I have the following crontab file

0 1 * * 1 volumes.sh
0 5 * * * mc.sh

and it results in "Your crontab file has an error in it... unexpected end of line". The first runs fine, but the second doesn't (the scripts are not the problem). What am I missing here?!!
 
Hmm - if you swap them around which one fails then? Mike
"Experience is the comb that Nature gives us after we are bald."

Is that a haiku?
I never could get the hang
of writing those things.
 
If I swap them around, mc.sh still doesn't work, so I guess the order doesn't matter. I copied this script from the volumes.sh script that does run which is why I'm thinking it's a crontab issue, not a script issue. Any other ideas? Am I neglecting something fundamental?
 
Ok... (I'm guessing here, you can probably tell)

Edit the file using vi and look at the control characters by using the vi command ':set list' -- do you see anything funny? Mike
"Experience is the comb that Nature gives us after we are bald."

Is that a haiku?
I never could get the hang
of writing those things.
 
I just get the standard end of line "$" marker after each line and then a final one at the end...

0 1 * * 1 volumes.sh$
0 5 * * * mc.sh$
$

I seem to recall something about that final line being needed (or maybe it was not needed?) but I've tried both and still nothing.
 
Have you tried deleting the line and then re-entering it? I don't think you need the final $ on it's own line.

HTH.
 
that's a thought - get rid of that final blank line Mike
"Experience is the comb that Nature gives us after we are bald."

Is that a haiku?
I never could get the hang
of writing those things.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top