Below is my cron entry:
#!/bin/bash
09 01 * * * /home/c/charlesp/jobs.sh > /home/c/charlesp/jobs1.log 2>&1
which gives me only the error output, but not the actual output for which the script is written. The script is working fine and giving desired output when it is executed directly, but not in cron. When it is running in crontab, the error given is below. Please help. The errors are only coming when I run them in cron; not outside of cron.
Errors:
1.When i give autorep command directly in the script:
/home/c/charlesp/jobs.sh: line 3: autorep: command not found
2.When i give autorep command along with absolute path in the script:
/opt/CA/WorkloadAutomationAE/autosys/bin/autorep: error while loading shared libraries: libascmn.so: cannot open shared object file: No such file or directory
My script is below:
Only autorep command:
#!/usr/local/bin/bash
autorep -j ALL -L0 | grep -w RU > /home/c/charlesp/jobs.txt
With absolute path :
#!/usr/local/bin/bash
/opt/CA/WorkloadAutomationAE/autosys/bin/autorep -j ALL -L0 | grep -w RU > /home/c/charlesp/jobs.txt