Professional Web Applications Themes

Crontab Linux FC 1 - Linux / Unix Administration

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

Sponsored Links
  1. #1

    Default Crontab Linux FC 1

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

    Sponsored Links
    yezi Guest

  2. #2

    Default Re: Crontab Linux FC 1

    On 20 Sep 2005 14:25:17 -0700, yezi <com> wrote: 

    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

    Dave Guest

  3. #3

    Default 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. >>
    $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

    yezi Guest

  4. #4

    Default Re: Crontab Linux FC 1

    50 15 12 * 2,4 /sbin/ping -c 100 -s 1000 www. [/ref]

    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.

    anyfox@gmail.com Guest

  5. #5

    Default Re: Crontab Linux FC 1

    On 20 Sep 2005 14:59:01 -0700, yezi
    <com> wrote: 
    Are you sure ping is in /sbin? It's in /bin on my Ubuntu system.
    ifconfig and route are in /sbin.


    --
    No man would listen to you talk if he didn't know it was his turn next.
    -- E.W. Howe
    Bill Guest

  6. #6

    Default Re: Crontab Linux FC 1

    yezi wrote: 

    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
    JohnK Guest

  7. #7

    Default Re: Crontab Linux FC 1

    JohnK wrote: 
    >
    > 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[/ref]

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

    JohnK
    JohnK Guest

  8. #8

    Default Re: Crontab Linux FC 1

    <com> wrote in <googlegroups.com>: 

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

    --
    Stein Arne
    Stein Guest

  9. #9

    Default Re: Crontab Linux FC 1

    In article <localnet>, Bill Mar wrote: 
    > Are you sure ping is in /sbin? It's in /bin on my Ubuntu system.
    > ifconfig and route are in /sbin.[/ref]

    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 <ntc.nokia.com>
    #include <disclaimer.h>
    #Not speaking for my employer. No warranty. YMMV.
    Mikko Guest

  10. #10

    Default Re: Crontab Linux FC 1

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

    yezi Guest

Similar Threads

  1. Crontab
    By Antigoni in forum Linux / Unix Administration
    Replies: 2
    Last Post: June 4th, 12:15 PM
  2. crontab log
    By NIr in forum Sun Solaris
    Replies: 2
    Last Post: August 27th, 11:02 PM
  3. crontab bug?
    By LeVA in forum Debian
    Replies: 1
    Last Post: August 4th, 12:10 AM

Bookmarks

Posting Permissions

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

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139