Cron/script oddness - Slackware

This is a discussion on Cron/script oddness - Slackware ; I run a leafnode server on my server box and use a script to update with a crontab entry. I recently upgraded from 10.1 to 12.1 (big ol jump!) and the script no longer works. Script: ----- #!/bin/bash # # ...

+ Reply to Thread
Results 1 to 4 of 4

Thread: Cron/script oddness

  1. Cron/script oddness

    I run a leafnode server on my server box and use a script to update with
    a crontab entry. I recently upgraded from 10.1 to 12.1 (big ol jump!)
    and the script no longer works.

    Script:
    -----
    #!/bin/bash
    #
    # Update NNTP feeds

    /usr/local/sbin/fetchnews -vv

    exit 0
    -----

    Error:

    /bin/sh: bin: command not found


    Um, huh? I've tried putting an export PATH=yadda in with no results.

    --
    Evening hours "all clear" for romance!
    (Tell mate you have to work late.)

    www.websterscafe.com

  2. Re: Cron/script oddness

    On Mon, 29 Sep 2008 17:24:03 -0700, Handover Phist wrote:

    >I run a leafnode server on my server box and use a script to update with
    >a crontab entry. I recently upgraded from 10.1 to 12.1 (big ol jump!)
    >and the script no longer works.
    >
    >Script:
    >-----
    >#!/bin/bash
    >#
    ># Update NNTP feeds
    >
    >/usr/local/sbin/fetchnews -vv
    >
    >exit 0
    >-----
    >
    >Error:
    >
    >/bin/sh: bin: command not found


    Is /usr/local/sbin/fetchnews a shell script? If so maybe it needs a
    full path somewhere?
    >
    >Um, huh? I've tried putting an export PATH=yadda in with no results.


    Don't think export paths help, absolute paths in each script better
    (more reliable) for cron jobs.

    Grant.
    --
    http://bugsplatter.id.au:8080/ dodo, for internet that dies

  3. Re: Cron/script oddness

    On 2008-09-30, Grant wrote:
    > On Mon, 29 Sep 2008 17:24:03 -0700, Handover Phist wrote:
    >
    >>Script:
    >>-----
    >>#!/bin/bash
    >>#
    >># Update NNTP feeds
    >>
    >>/usr/local/sbin/fetchnews -vv
    >>
    >>exit 0
    >>-----
    >>
    >>Error:
    >>
    >>/bin/sh: bin: command not found

    >
    > Is /usr/local/sbin/fetchnews a shell script? If so maybe it needs a
    > full path somewhere?


    No, it's a compiled binary.

    First, can you run fetchnews -vv from a commandline? If so, then can
    you run your script from the commandline?

    Do you even need a shell script? I just do

    */10 * * * * exec /usr/local/sbin/fetchnews

    in news's crontab.

    --keith

    --
    kkeller-usenet@wombat.san-francisco.ca.us
    (try just my userid to email me)
    AOLSFAQ=http://www.therockgarden.ca/aolsfaq.txt
    see X- headers for PGP signature information


  4. Re: Cron/script oddness

    Keith Keller :
    > On 2008-09-30, Grant wrote:
    >> On Mon, 29 Sep 2008 17:24:03 -0700, Handover Phist wrote:
    >>
    >>>Script:
    >>>-----
    >>>#!/bin/bash
    >>>#
    >>># Update NNTP feeds
    >>>
    >>>/usr/local/sbin/fetchnews -vv
    >>>
    >>>exit 0
    >>>-----
    >>>
    >>>Error:
    >>>
    >>>/bin/sh: bin: command not found

    >>
    >> Is /usr/local/sbin/fetchnews a shell script? If so maybe it needs a
    >> full path somewhere?

    >
    > No, it's a compiled binary.
    >
    > First, can you run fetchnews -vv from a commandline? If so, then can
    > you run your script from the commandline?


    Yes and yes, te=here's no problem with the script. As it stands now I
    run the script before I read and after I post.

    > Do you even need a shell script? I just do
    >
    > */10 * * * * exec /usr/local/sbin/fetchnews
    >
    > in news's crontab.


    I'll try that. Thanks.

    --
    You have taken yourself too seriously.

    www.websterscafe.com

+ Reply to Thread