Crontab Linux FC 1 - Unix

This is a discussion on Crontab Linux FC 1 - Unix ; HOw can I check the crontab is execute like what I set up ? Thanks....

+ Reply to Thread
Results 1 to 9 of 9

Thread: Crontab Linux FC 1

  1. Crontab Linux FC 1

    HOw can I check the crontab is execute like what I set up ? Thanks.


  2. Re: Crontab Linux FC 1

    On 20 Sep 2005 14:25:17 -0700, yezi wrote:
    > HOw can I check the crontab is execute like what I set up ? Thanks.


    crontab -l will show you what it runs, and when. man crontab for the
    syntax.

    If you're asking because a cronjob isn't running as expected, know that
    a cron job doesn't execute that user's .login or .profile or .bashrc or
    similar, so the environment needs to be set in the jobs crontab runs.

    If I've missed the meaning of your question entirely, please try asking
    it a different way.

    Dave Hinz


  3. Re: Crontab Linux FC 1

    I think the way I am asking is sth wrong. My problem is I edit the
    crontab by -e , and by -l , I find the task is list in the crontab,
    However I canot find the result of the crontab. My crontab is
    following:

    50 15 12 * 2,4 /sbin/ping -c 100 -s 1000 www.yahoo.com >>
    $HOME/data/test_perl/try1.txt

    I supposed to find some data in the try1.txt. however , it is nothing
    in the file. SO I can check if the crontab is running according to the
    schedule. and how to verify that ? Thanks for any comments


  4. Re: Crontab Linux FC 1

    50 15 12 * 2,4 /sbin/ping -c 100 -s 1000 www.yahoo.com
    >>$HOME/data/test_perl/try1.txt 2>&1


    1: add the 2>&1 to your command end, and check your try1.txt.
    2: maybe the cron will send a mail to you if the crontab is run.


  5. Re: Crontab Linux FC 1

    yezi wrote:
    > I think the way I am asking is sth wrong. My problem is I edit the
    > crontab by -e , and by -l , I find the task is list in the crontab,
    > However I canot find the result of the crontab. My crontab is
    > following:
    >
    > 50 15 12 * 2,4 /sbin/ping -c 100 -s 1000 www.yahoo.com >>
    > $HOME/data/test_perl/try1.txt
    >
    > I supposed to find some data in the try1.txt. however , it is nothing
    > in the file. SO I can check if the crontab is running according to the
    > schedule. and how to verify that ? Thanks for any comments
    >


    Your entry is set to run on the 12th of the month at 15:50 and also on
    Tuesdays and Thursdays. Do you need to reschedule the entry to run more
    often (at least for testing)?

    JohnK

  6. Re: Crontab Linux FC 1

    JohnK wrote:
    > yezi wrote:
    >
    >> I think the way I am asking is sth wrong. My problem is I edit the
    >> crontab by -e , and by -l , I find the task is list in the crontab,
    >> However I canot find the result of the crontab. My crontab is
    >> following:
    >>
    >> 50 15 12 * 2,4 /sbin/ping -c 100 -s 1000 www.yahoo.com >>
    >> $HOME/data/test_perl/try1.txt
    >>
    >> I supposed to find some data in the try1.txt. however , it is nothing
    >> in the file. SO I can check if the crontab is running according to the
    >> schedule. and how to verify that ? Thanks for any comments
    >>

    >
    > Your entry is set to run on the 12th of the month at 15:50 and also on
    > Tuesdays and Thursdays. Do you need to reschedule the entry to run more
    > often (at least for testing)?
    >
    > JohnK


    Also - on my Linux box (Suse 9.2), ping is located at /bin/ping.

    JohnK

  7. Re: Crontab Linux FC 1

    wrote in <1127253541.696699.195960@g14g2000cwa.googlegroups. com>:
    > I think the way I am asking is sth wrong. My problem is I edit the
    > crontab by -e , and by -l , I find the task is list in the crontab,
    > However I canot find the result of the crontab. My crontab is
    > following:
    >
    > 50 15 12 * 2,4 /sbin/ping -c 100 -s 1000 www.yahoo.com >>
    > $HOME/data/test_perl/try1.txt
    >
    > I supposed to find some data in the try1.txt. however , it is nothing
    > in the file. SO I can check if the crontab is running according to the
    > schedule. and how to verify that ? Thanks for any comments


    Check your mail on the machine. /var/spool/mail/
    Check /var/log/cron
    Redirect stderr to stdout: 2>&1

    --
    Stein Arne

  8. Re: Crontab Linux FC 1

    In article , Bill Marcum wrote:
    > On 20 Sep 2005 14:59:01 -0700, yezi
    > wrote:
    >> I think the way I am asking is sth wrong. My problem is I edit the
    >> crontab by -e , and by -l , I find the task is list in the crontab,
    >> However I canot find the result of the crontab. My crontab is
    >> following:
    >>
    >> 50 15 12 * 2,4 /sbin/ping -c 100 -s 1000 www.yahoo.com >>
    >> $HOME/data/test_perl/try1.txt
    >>

    > Are you sure ping is in /sbin? It's in /bin on my Ubuntu system.
    > ifconfig and route are in /sbin.


    Well... obivously it depends.

    $ type ping
    ping is /usr/sbin/ping
    $ ls -l /sbin/pi*
    /sbin/pi* not found

    Unfortunately ping is one of the utilities that are never where you
    expect, and one that you need fairly often too.


    --
    Mikko Nahkola
    #include
    #Not speaking for my employer. No warranty. YMMV.

  9. Re: Crontab Linux FC 1

    many thanks, I find the trail of the crontab in mail .
    I will direct the stderr to &1


+ Reply to Thread