I have a script running in the crontab that gets data from a database every hour. Now I would like to execute a fortran routine to process the data in some way, after getting it and saving it locally.
I have added the following commands to my script:
set convert = ${outputdir}/Scripts/data_latest.txt
cd ${outputdir}/Scripts
f90 -o routine.x routine.f
routine.x filename.dat > $convert
The output from the routine should be written in the 'convert' file, which is data_latest.txt. The file 'filename.dat' is the input file which was received from the database. When I run the script separately, the 'convert' file is filled with output, but when the script is executed in the crontab, it is completely empty.
What should I do in order to run this routine (embedded in the script) automatically and receive my output in the output file?
Thanks in advance.