[NTLUG:Discuss] OT: crontab arguments question

Leroy Tennison leroy_tennison at prodigy.net
Fri Feb 22 21:27:48 CST 2008


Fred James wrote:
> All
> OT: crontab arguments question
> I need to pass an argument to my program from the crontab entry
> Problem: the first argument is taken by an environmental script
> Question: how do I provide for this?
> 
> Example:
> 55 13 * * * su - oracle -c /apps/oracle/ppdb_scripts/SidTest/willi.sh ppdb
>     the su - oracle -c is required to set certain environmental variable 
> or nothing works
>     the ppdb is the SID the the su - oracle eats up on the way through, 
> and I need to send another ppdb to my program
> 
> something like ...
> 55 13 * * * su - oracle -c /apps/oracle/ppdb_scripts/SidTest/willi.sh 
> ppdb ppdb
> ... except that doesn't work ...
> 
> Thank you in advance for any help you may be able to offer
> Regards
> Fred James
> 
> 
> 
> _______________________________________________
> http://www.ntlug.org/mailman/listinfo/discuss
> 
I have no idea if this would work or not but can you embed some (or all) 
of the execution/parameter stuff in a script file and then refer to the 
script in the crontab?  I'm hoping that a script will give you enough 
isolation that the right program can get it's necessary parameters.



More information about the Discuss mailing list