Loading ...
Sorry, an error occurred while loading the content.

Re: [SUSE Linux Users] cant get cron to do the jobs :(

Expand Messages
  • Keith Hopkins (Yahoo)
    ... What archaic version of cron are you running? cron checks each minute to see if its spool directory s modtime (or the mod- time on /etc/crontab) has
    Message 1 of 6 , May 1 12:49 AM
    • 0 Attachment
      Aaron Kulkis wrote:
      > hansw_id wrote:
      >
      >> does anyone know how to get cron to do its job??? i m using suse 10.0.
      >> Then i hv a script at /root/bin/myscript which will sync my data. I
      >> made it executable using chmod a+x myscript. Then in /etc/crontab i
      >> added a line like this one :
      >>
      >> 10 10 * * * /root/bin/myscript
      >>
      >> I also hv start cron by this command :
      >> /etc/init.d/cron start
      >>
      >> But the cron never work! The script never executed at 10:10 AM.
      >> Anyone can please give me a clue??
      >>
      >
      > Did you just edit the crontab, or did you COMMIT it to the cron
      > process with the command
      >
      > crontab /etc/crontab
      >
      > Until you commit it, cron doesn't know you changed anything,
      > because cron reads the crontab only ONCE, and ignores all
      > changes until you either
      >
      > 1) explicitly tell it that you made changes with the crontab command
      >
      > or
      >
      > 2) reboot the machine
      >
      >
      What archaic version of cron are you running?

      cron checks each minute to see if its spool directory's modtime
      (or the mod-
      time on /etc/crontab) has changed, and if it has, cron will then
      examine the modtime on all
      crontabs and reload those which have changed. Thus cron need
      not be restarted whenever a
      crontab file is modified. Note that the Crontab(1) command
      updates the modtime of the
      spool directory whenever it changes a crontab.

      --Keith



      [Non-text portions of this message have been removed]
    • gaurav dogra
      It might be possible that cron is executing the script on schedule time but there are some other errors while getting the desired output. check /var/log/cron
      Message 2 of 6 , May 1 9:08 PM
      • 0 Attachment
        It might be possible that cron is executing the script
        on schedule time but there are some other errors while
        getting the desired output. check /var/log/cron and
        check if cron execute your script at scheduled time.

        --- "Keith Hopkins (Yahoo)" <yahoo@...> wrote:

        > Aaron Kulkis wrote:
        > > hansw_id wrote:
        > >
        > >> does anyone know how to get cron to do its job???
        > i m using suse 10.0.
        > >> Then i hv a script at /root/bin/myscript which
        > will sync my data. I
        > >> made it executable using chmod a+x myscript. Then
        > in /etc/crontab i
        > >> added a line like this one :
        > >>
        > >> 10 10 * * * /root/bin/myscript
        > >>
        > >> I also hv start cron by this command :
        > >> /etc/init.d/cron start
        > >>
        > >> But the cron never work! The script never
        > executed at 10:10 AM.
        > >> Anyone can please give me a clue??
        > >>
        > >
        > > Did you just edit the crontab, or did you COMMIT
        > it to the cron
        > > process with the command
        > >
        > > crontab /etc/crontab
        > >
        > > Until you commit it, cron doesn't know you changed
        > anything,
        > > because cron reads the crontab only ONCE, and
        > ignores all
        > > changes until you either
        > >
        > > 1) explicitly tell it that you made changes with
        > the crontab command
        > >
        > > or
        > >
        > > 2) reboot the machine
        > >
        > >
        > What archaic version of cron are you running?
        >
        > cron checks each minute to see if its spool
        > directory's modtime
        > (or the mod-
        > time on /etc/crontab) has changed, and if it
        > has, cron will then
        > examine the modtime on all
        > crontabs and reload those which have
        > changed. Thus cron need
        > not be restarted whenever a
        > crontab file is modified. Note that the
        > Crontab(1) command
        > updates the modtime of the
        > spool directory whenever it changes a
        > crontab.
        >
        > --Keith
        >
        >
        >
        > [Non-text portions of this message have been
        > removed]
        >
        >


        __________________________________________________
        Do You Yahoo!?
        Tired of spam? Yahoo! Mail has the best spam protection around
        http://mail.yahoo.com
      • Aaron Kulkis
        ... Actually, that s still the rule for the most modern versions of Solaris and HP-UX which is what I spend most of my time doing administration on. ... A
        Message 3 of 6 , May 1 9:16 PM
        • 0 Attachment
          Keith Hopkins (Yahoo) wrote:
          > Aaron Kulkis wrote:
          >
          >>hansw_id wrote:
          >>
          >>
          >>>does anyone know how to get cron to do its job??? i m using suse 10.0.
          >>>Then i hv a script at /root/bin/myscript which will sync my data. I
          >>>made it executable using chmod a+x myscript. Then in /etc/crontab i
          >>>added a line like this one :
          >>>
          >>>10 10 * * * /root/bin/myscript
          >>>
          >>>I also hv start cron by this command :
          >>>/etc/init.d/cron start
          >>>
          >>>But the cron never work! The script never executed at 10:10 AM.
          >>>Anyone can please give me a clue??
          >>>
          >>
          >>Did you just edit the crontab, or did you COMMIT it to the cron
          >>process with the command
          >>
          >>crontab /etc/crontab
          >>
          >>Until you commit it, cron doesn't know you changed anything,
          >>because cron reads the crontab only ONCE, and ignores all
          >>changes until you either
          >>
          >>1) explicitly tell it that you made changes with the crontab command
          >>
          >>or
          >>
          >>2) reboot the machine
          >>
          >>
          >
          > What archaic version of cron are you running?

          Actually, that's still the rule for the most modern versions
          of Solaris and HP-UX which is what I spend most of my time
          doing administration on.

          >
          > cron checks each minute to see if its spool directory's modtime
          > (or the mod-


          A recent change which I was unaware of.

          I haven't messed with the crontabs on a SuSE machine in a long
          time, due to the cron.hourly, cron.daily, cron.weekly and cron.monthly
          scripts.


          > time on /etc/crontab) has changed, and if it has, cron will then
          > examine the modtime on all
          > crontabs and reload those which have changed. Thus cron need
          > not be restarted whenever a
          > crontab file is modified. Note that the Crontab(1) command
          > updates the modtime of the
          > spool directory whenever it changes a crontab.
          >
          > --Keith
          >
        Your message has been successfully submitted and would be delivered to recipients shortly.