Results 1 to 7 of 7

Thread: Crontab Error

  1. #1
    Join Date
    Oct 2003
    Location
    Abu Dhabi
    Posts
    14

    Unanswered: 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

  2. #2
    Join Date
    Aug 2003
    Location
    Argentina
    Posts
    780

    Re: Crontab Error

    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.

  3. #3
    Join Date
    Oct 2003
    Location
    Abu Dhabi
    Posts
    14

    Re: Crontab Error

    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

  4. #4
    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


    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

  5. #5
    Join Date
    Aug 2003
    Location
    Argentina
    Posts
    780

    Re: Crontab Error

    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.

  6. #6
    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

  7. #7
    Join Date
    Oct 2003
    Location
    Abu Dhabi
    Posts
    14

    Re: Crontab Error

    Originally posted by gurey
    Hi,

    Can be that the error this in the script ?

    Gustavo.
    Hi Gustavo,

    Now ist working fine ,

    thanks you

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •