Find the answer to your Linux question:
Results 1 to 9 of 9
Hi There my cron job won't work when I put hour 48 * * * * /home/oracle/disk It works on minutes, but when I put 08 or 8 it doesn't ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Feb 2013
    Location
    Manila
    Posts
    17

    Question Cron won't work on Hour


    Hi There my cron job won't work when I put hour

    48 * * * * /home/oracle/disk

    It works on minutes, but when I put 08 or 8 it doesn't run...

    Running at GNU/Linux 64bit

  2. #2
    Linux User
    Join Date
    Dec 2011
    Location
    Turtle Island West
    Posts
    345
    My apologies, but your question doesn't make sense. What do you mean 'it works on minutes'? What works on minutes? What is 08 or 8? Show some examples of what you have tried and the errors you get. I'm still only guessing here, but what is /home/oracle/desk? Some kind of script?

    Where is the file? What's it called. What else is in it? Info please.

    On my system, if you want something to run daily, you put an executable script into /etc/cron.daily, but this is controlled by /etc/crontab. Mine runs everything in cron.daily at 4 in the morning, every day.

    'man 5 crontab' might work here.

  3. #3
    Just Joined!
    Join Date
    Jun 2012
    Posts
    9
    I think I understand the question.
    If you want to run your script at 8h, you just put this in your crontab:
    Code:
    0 8 * * * /home/oracle/disk
    To make it run at 8h48, put this:
    Code:
    48 8 * * * /home/oracle/disk

  4. #4
    Just Joined!
    Join Date
    Jul 2008
    Posts
    54
    Quote Originally Posted by Gideon2 View Post
    48 * * * * /home/oracle/disk
    What you have written should run every hour on the 48th minute, i.e. 00:48, 01:48, 02:48, and so on through 23:48. If it isn't running then there are two likely problems.

    1) There's something wrong with /home/oracle/disk that isn't working, i.e. it is launched but errors out or
    2) You don't have the cron daemon (crond) running.

    As others have said, without further information it will be hard to troubleshoot your issue.

  5. #5
    Just Joined!
    Join Date
    Feb 2013
    Location
    Manila
    Posts
    17
    Quote Originally Posted by Toadbrooks View Post
    What you have written should run every hour on the 48th minute, i.e. 00:48, 01:48, 02:48, and so on through 23:48. If it isn't running then there are two likely problems.

    1) There's something wrong with /home/oracle/disk that isn't working, i.e. it is launched but errors out or
    2) You don't have the cron daemon (crond) running.

    As others have said, without further information it will be hard to troubleshoot your issue.
    The crond is running... the /disk file ran when I used only minutes, but when I add 8 or make it 48 8 * * *, it doesn't work... As per checking with the cron log, it has a RELOAD word...

    The disk file runs a df command, getting the size of / and /u01...
    Last edited by Gideon2; 02-13-2013 at 06:19 AM.

  6. #6
    Just Joined!
    Join Date
    Feb 2013
    Location
    Manila
    Posts
    17
    Quote Originally Posted by Miven View Post
    My apologies, but your question doesn't make sense. What do you mean 'it works on minutes'? What works on minutes? What is 08 or 8? Show some examples of what you have tried and the errors you get. I'm still only guessing here, but what is /home/oracle/desk? Some kind of script?

    Where is the file? What's it called. What else is in it? Info please.

    On my system, if you want something to run daily, you put an executable script into /etc/cron.daily, but this is controlled by /etc/crontab. Mine runs everything in cron.daily at 4 in the morning, every day.

    'man 5 crontab' might work here.
    I've checked the cron.daily. There are programs that runs at 4am, can I add another line that will run a file at 3am?

  7. #7
    Just Joined!
    Join Date
    Jul 2008
    Posts
    54
    Quote Originally Posted by Gideon2 View Post
    The crond is running... the /disk file ran when I used only minutes, but when I add 8 or make it 48 8 * * *, it doesn't work... As per checking with the cron log, it has a RELOAD word...

    The disk file runs a df command, getting the size of / and /u01...
    OK, so you are saying that when you have this:

    48 * * * * /home/oracle/disk

    it works, but when you have this:

    48 8 * * * /home/oracle/disk

    it does not work, yes?

    I don't recognize the RELOAD word you mentioned. If you can provide more context, I'll take a shot. But otherwise I can think of no reason things shouldn't work as above ... unless of course what you actually have is:

    48 8 * * * * /home/oracle/disk (i.e. an extra *)

    If you want to use cron.daily, you can, but I think that's only run once per day at a specific time which I think is set by crontab, so it would run at the same time as the other cron.daily commands. Personally I just use crontab for everything - saves remembering where I put an entry later.
    Last edited by Toadbrooks; 02-13-2013 at 01:14 PM. Reason: spelling

  8. #8
    Just Joined!
    Join Date
    Feb 2013
    Location
    Manila
    Posts
    17
    Quote Originally Posted by Toadbrooks View Post
    OK, so you are saying that when you have this:

    48 * * * * /home/oracle/disk

    it works, but when you have this:

    48 8 * * * /home/oracle/disk

    it does not work, yes?

    I don't recognize the RELOAD word you mentioned. If you can provide more context, I'll take a shot. But otherwise I can think of no reason things shouldn't work as above ... unless of course what you actually have is:

    48 8 * * * * /home/oracle/disk (i.e. an extra *)

    If you want to use cron.daily, you can, but I think that's only run once per day at a specific time which I think is set by crontab, so it would run at the same time as the other cron.daily commands. Personally I just use crontab for everything - saves remembering where I put an entry later.
    Here a syntax of the reload...

    Feb 13 11:01:01 [server] crond[6747]: (oracle) RELOAD (cron/oracle)

  9. #9
    Just Joined!
    Join Date
    Jul 2008
    Posts
    54
    Quote Originally Posted by Gideon2 View Post
    Here a syntax of the reload...

    Feb 13 11:01:01 [server] crond[6747]: (oracle) RELOAD (cron/oracle)
    All that is is the cron daemon telling you it reloaded the events you have scheduled for execution. It has nothing to do with whether the job you are asking about executed or not.

Posting Permissions

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