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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Resolution for crontab -e

Status
Not open for further replies.

msen

IS-IT--Management
Apr 24, 2001
36
US
I am getting the following error when I do crontab -e and then try to save it. Urgent help required.

"/tmp/crontabITaiHS" 11 lines, 832 characters
0,15,30,45 * 11 /opt/Cleanup/scripts/mscleanupls.ksh
crontab: error on previous line; unexpected character found in line.
crontab: errors detected in input, no crontab file generated.
 
You are missing 2 parameters ( must have 5 )
mm hh month week day

so when do you want to run your
/opt/Cleanup/scripts/mscleanupls.ksh ?


Dickie Bird (:)-)))
 
I want the cron to run at, for example:

For every hour at 00, 15, 30, 45
For 11 Dec.

 
That would be :

00,15,30,45 11 12 * /opt/Cleanup/scripts/mscleanupls.ksh

By the way,
I got me descriptions slightly wrong earlier, it's :
1st = minute 0 through 59
2nd = hour 0 through 23
3rd = day_of_month 1 through 31
4th = month 1 through 12
5th = weekday 0 through 6 for Sunday through Saturday
6th = command a shell command


Dickie Bird (:)-)))
 
I always add this to the top of my crontab so I can remember which field is which:

# minute (0-59)
# | hour (0-23)
# | | day of the month (1-31)
# | | | month of the year (1-12)
# | | | | day of the week (0-6 with 0=Sunday)
# | | | | | commands
#

you will want:

0,15,30,45 * 11 12 * /opt/Cleanup/scripts/mscleanupls.ksh
 
Bi is correct - I missed off the hour asterix - oops

Dickie Bird (:)-)))
 
Dickiebird, that's why I always have my cron cheat sheet available! [wink]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top