I need to run an application with
krenew, but the application also needs to receive a parameter via command line and I need to send its output to a file. From the documentation, it looks like this should do the trick:
krenew -t -- sh -c 'compute-job > /afs/local/data/output'
but, unfortunately, when I run the command below:
krenew -s -- sh -c './my_app config.xml > results/test.txt &'
the application just dies after a while and I can see from the output of
ps aux that
krenew is not running along with
my_app. I am not sure what the parameter
-t does, and as far as I can see, if I run
krenew -s ./my_app, it works properly.
I hope someone can clarify this.
Update: If I remove the "&" character from the command (so it won't be detached from the console it works just fine, so I decided to run it in a SCREEN tab. While this is not the best solution, it does the job.