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

Re: [nslu2-general] Re: Problems with cron

Expand Messages
  • John
    Daniel, ... Do the programs that you are running in crontab need the PATH variable in order to run other programs? Many unix programs call/run other unix
    Message 1 of 10 , Aug 2, 2007
    • 0 Attachment
      Daniel,

      > John, I'm using absolute paths in my crontab. Should I add the PATH
      > variable anyway?

      Do the programs that you are running in crontab need the PATH
      variable in order to run other programs? Many unix programs
      call/run other unix programs.

      The example you gave was /etc/syncdate. I don't know what
      that is but, from the name alone, it seems quite possible that its
      operation depends on being able to find another program in the path
      such as rdate or ntpdate or ntpd or similar.

      If things are set up right, any output from the cron job
      should be mailed to you. Do you get any error messages from the
      cron job?

      John
    • Daniel Berenguer
      ... Hi John. Setting PATTH makes no differrence so far. I m even testing with more simple crontabs and most of the times they don t work. Ex: SHELL=/bin/sh
      Message 2 of 10 , Aug 4, 2007
      • 0 Attachment
        --- In nslu2-general@yahoogroups.com, John <jl.050877@...> wrote:
        >
        > Daniel,
        >
        > > John, I'm using absolute paths in my crontab. Should I add the PATH
        > > variable anyway?
        >
        > Do the programs that you are running in crontab need the PATH
        > variable in order to run other programs? Many unix programs
        > call/run other unix programs.
        >
        > The example you gave was /etc/syncdate. I don't know what
        > that is but, from the name alone, it seems quite possible that its
        > operation depends on being able to find another program in the path
        > such as rdate or ntpdate or ntpd or similar.
        >
        > If things are set up right, any output from the cron job
        > should be mailed to you. Do you get any error messages from the
        > cron job?
        >
        > John

        Hi John.

        Setting PATTH makes no differrence so far. I'm even testing with more
        simple crontabs and "most of the times" they don't work. Ex:

        SHELL=/bin/sh
        PATH=/sbin:/bin:/usr/sbin:/usr/bin:/opt/bin:/opt/sbin

        0 0 * * * echo "hello!" >> /home/hello.txt

        At 00:00 sometimes hello.txt is created and edited and sometimes not.
        I'm plying with the system time in order to do my tests and this is
        maybe somehow causing problems, but I'm not sure.

        Now I realize that pointing to a script placed in /home or /etc
        doesn't make any difference either.

        ... I'm continuing with my tests...

        Thank you very much,

        Daniel.
      Your message has been successfully submitted and would be delivered to recipients shortly.