Skip to Content

adopt environment variables

So we need to schedule a crontab job to back our logs for every 20 min. The command we use to backup said logs is the following:

dbmcli -d "DB" -u "username","password" -uUTL -c backup_START BackLog "Template".

This has been added to a .sh file. The current issue is that AIX team said we need to adopt the environment variables in the script for it to be able to run as crontab job. Never did this before. Any Idea of how to do this?

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

1 Answer

  • Posted on Apr 09, 2019 at 09:41 AM

    Hi,
    the environment that is active when the cron job of a user is executed is NOT the same as the one the user sees while being logged on to an interactive shell.

    Please check this article for explanation and samples how to set the environment for a cron job:
    https://www-01.ibm.com/support/docview.wss?uid=isg3T1011623


    best regards, Harald

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.