Re: script run from crontab, output not appearing as expected

From: Renison, Rick (rick.renison_at_EDS.COM)
Date: 11/23/04

  • Next message: jason grove: "Re: AIX 4.3.3 to AIX 5.2"
    Date:         Tue, 23 Nov 2004 17:33:44 -0500
    To: aix-l@Princeton.EDU
    
    

    Probably an environment issue.
    If you run a file in your own environment (in .kshrc, .profile, etc.), then
    add this to the cron script. For example ". /fullpath/env_file".

    Rick Renison, EDS Canada, DuSC, Oshawa, Ontario
    There's no place like 127.0.0.1
    + mailto:rick.renison@eds.com

    -----Original Message-----
    From: IBM AIX Discussion List [mailto:aix-l@Princeton.EDU] On Behalf Of
    Andrew Townsend
    Sent: Tuesday, November 23, 2004 9:59 AM
    To: aix-l@Princeton.EDU
    Subject: script run from crontab, output not appearing as expected

    I created a script that requires one argument. When I run the script from
    the command line as root, my output appears as expected. When I run it from
    cron however, my output is not as expected. It is a TSM script that gathers
    information and outputs it into a file. From the command line, it shows me
    how much data has been backed up, from the crontab, it just shows zero in
    each column.

    Thus far, I am looking at this as a cron issue, not a TSM issue so I asked
    it here. If this is the wrong place for it, my apologies.

    Thanks in advance,

    Drew

    This email is confidential and intended solely for the use of the individual
    or entity to whom it is addressed. If you have received this email in error
    please notify the system manager at mailadmin@bisys.com and delete the email
    immediately.


  • Next message: jason grove: "Re: AIX 4.3.3 to AIX 5.2"

    Relevant Pages

    • Re: Cron question
      ... You can test things by doing an "su gs -c /bin/sh" from a root login and then trying to run your wrapper, which will give you a minimum environment closer to what cron executes under. ... I wrote a little ruby script to print out all set environment variable, then ran it under the simulated cron environment: ... SVN_EDITOR => vim ...
      (freebsd-questions)
    • RE: Perl Script as a Cron Job
      ... Perl Script as a Cron Job ... In who's crontab file have you put this entry? ... Do you need to HUP crond to get the cron -rescheduled? ... Try printing out the environment variables at the start of the ...
      (perl.beginners)
    • Re: help with my perl script
      ... Here's a handy method for getting the environment correct ... Most here probably know that cron does not setup the environment ... When a script is run withe 'at' utility however, ... Now as root, ...
      (perl.dbi.users)
    • Re: when run from cron, regex NEVER match, always give nil
      ... you could have other environment variables set in your BASH ... For apps I have to run from cron, if I need to, I'll write a ... wrapping .sh script that sets up the environment exactly as I need it. ...
      (comp.lang.ruby)
    • 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)

  • Quantcast