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 comment
10|10000 characters needed characters exceeded

  • Follow
  • Get RSS Feed

1 Answer

  • Apr 09 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 comment
    10|10000 characters needed characters exceeded