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

From: Justin Bleistein (justin.bleistein_at_TOWERSPERRIN.COM)
Date: 11/23/04

  • Next message: Billy Tyrer: "AIX 4.3.3 to AIX 5.2"
    Date:         Tue, 23 Nov 2004 10:21:41 -0500
    To: aix-l@Princeton.EDU
    
    

    If you are trying to pass an argument to a script/program via cron look at
    the: "%" operator in crontab documentation.
    Also, if your passing an argument "$1", then try to call the
    script/program itself and the argument from within another script
    which is called from cron, basically try not to use arguments/options
    against scripts/programs when calling them from
    crontab.

    --Justin Richard Bleistein
    AIX Systems Administrator

    Andrew Townsend <Andrew.Townsend@BISYS.COM>
    Sent by: IBM AIX Discussion List <aix-l@Princeton.EDU>
    11/23/2004 09:58 AM
    Please respond to
    IBM AIX Discussion List <aix-l@Princeton.EDU>

    To
    aix-l@Princeton.EDU
    cc

    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.

    NOTICE: This communication may contain confidential, proprietary or
    legally privileged information. It is intended only for the person(s) to
    whom it is addressed. If you are not an intended recipient, you may not
    use, read, retransmit, disseminate or take any action in reliance upon it.
    Please notify the sender that you have received it in error and
    immediately delete the entire communication, including any attachments.
    Towers Perrin does not encrypt and cannot ensure the confidentiality or
    integrity of external e-mail communications and, therefore, cannot be
    responsible for any unauthorized access, disclosure, use or tampering that
    may occur during transmission. This communication is not intended to
    create or modify any obligation, contract or warranty of Towers Perrin,
    unless the firm clearly expresses such an intent.


  • Next message: Billy Tyrer: "AIX 4.3.3 to AIX 5.2"

    Relevant Pages

    • Re: environment variables in perl scripts
      ... In crontab, add this line ... This will execute .profile before running the script. ... environment variables in perl scripts ... > This communication is intended for the use of the recipient to which it is ...
      (perl.dbi.users)
    • Crontab for different ime zones
      ... America/New_York I wanted ONE crontab that ... in and out all the time (even if that could be done by a cron job). ... PHP script returns the server default timestamp. ... Example: it is currently 1:45 pm Sydney time. ...
      (freebsd-questions)
    • Re: Output to file lost when using cron
      ... > When executing as 'root' user it sends the output to the file ... If I have the script run from cron no output is generated. ... Did you change the crontab ...
      (comp.unix.aix)
    • Re: Making Files Readonly With a script
      ... >> could do this with cron, can anyone help me with the commands that I ... > messing with crontab. ... And that way it gets processed by anacron if the ... For the cron.daily script, make sure you use full paths for EVERYTHING. ...
      (comp.os.linux.setup)
    • Re: GPG in crontab causes blank messages
      ... When I run my crontab command manually in terminal, ... But since the output of the script contains a big list of files, ... If I remove the GPG portion of the command, ...
      (comp.sys.mac.apps)