Script won't run from cron

From: Andrew McNaughton (andrew_at_scoop.co.nz)
Date: 05/21/04

  • Next message: Ian Moore: "pppd & auth-up"
    Date: Fri, 21 May 2004 20:20:04 +1200 (NZST)
    To: freebsd-questions@freebsd.org
    
    

    Since upgrading from 4.5-RELEASE to 4.8-RELEASE (actually rebuilding the
    system and mounting the old /home directory), I'm having problems with a
    process which rebuilds a search engine index. Everything runs fine from
    the command line, but the same script fails when running from cron.

    The /bin/sh script runs, but when it goes to fire up the indexing process,
    that process fails. So far I can't figure out what is different about the
    environment this is running under which should make it behave differently
    from cron.

    I've added commands into the shell script which report on the output of
    set, id and limits. At the command line I've then verified that id and
    limits give identical values, and I've used 'env' to start the script with
    the same environment varibales it gets in cron. That proceeds corectly,
    leaving me with still no idea why the same script doesn't run from cron
    any more.

    Any ideas?

    Andrew McNaughton

    Please mail me responses directly.

    --
    No added Sugar.  Not tested on animals.  May contain traces of Nuts.  If
    irritation occurs, discontinue use.
    -------------------------------------------------------------------
    Andrew McNaughton           Living in a shack in Tasmania
    andrew@scoop.co.nz          Between the bush and the sea
    Mobile: +61 422 753 792     http://staff.scoop.co.nz/andrew/cv.doc
                                http://www.scoop.co.nz/
    _______________________________________________
    freebsd-questions@freebsd.org mailing list
    http://lists.freebsd.org/mailman/listinfo/freebsd-questions
    To unsubscribe, send any mail to "freebsd-questions-unsubscribe@freebsd.org"
    

  • Next message: Ian Moore: "pppd & auth-up"

    Relevant Pages

    • Re: Nmon scheduling question
      ... command ran first then in the script is the ps and kill command so it ... Vince this is a great script. ... Cron Job with pid: 135238 Failed ...
      (AIX-L)
    • SUMMARY: cron entry: nth day of every month?
      ... cron can not handle this with its own syntax. ... 21st but "command" only runs if the output of the "date" command ... What I would suggest is rather than embedding the logic in each script ... The answer is it is _not_ possible to control it only with crontab ...
      (Tru64-UNIX-Managers)
    • Re: Cron Job
      ... If you mean the computer itself, put that command ... The standard 'cron' runs jobs at a specific time/date. ... Init or @reboot run jobs when ... Sunday night at 02:00) then copy the script and cron entry. ...
      (comp.os.linux.misc)
    • Cron entry & .profile question
      ... Cron jobs can be confusing at times. ... When I run a script I wrote from ... The bourne shell uses the command "." ... Should I run my cron job as root or should I make a new cron entry ...
      (SunManagers)
    • Re: Problems trying to configure Linux laptop to print to Windows XP shared printer
      ... map to guest = Never ... check password script = ... enumports command = ... ldap delete dn = No ...
      (comp.os.linux.setup)

  • Quantcast