Using Input Parameter fiel in Cron
Posted on 1997-04-30
I am trying to use Cron to call a script. The problem is that I want to pass the script an input parameter file. Whenever I use an input file I get errors depending on how I try to direct the file. This is what the crontab file looks like:
55 * * 3 * /home/test/cron2.scp input.txt
If I put the input paramters in the crontab file it works, but I want to be able to change the parameters easily.
I have tried to direct the file like this:
55 * * 3 * /home/test/cron2.scp /home/input.txt
55 * * 3 * /home/test/cron2.scp @/home/input.txt
55 * * 3 * /home/test/cron2.scp /firstname.lastname@example.org
55 * * 3 * /home/test/cron2.scp </home/input.txt
55 * * 3 * /home/test/cron2.scp >/home/input.txt
The errors I get are; If I use '@' to try and signify that it is a file I get a TNS error from Orcale saying that it is an invalid login/password.
If I use >, < or just the path and file name, Unix uses the whole string as input (pathname & filename) instead of using the contents of the file.