I've set up a cron task to run my script called outcam.sh. This script opens a camera, prints "Program launched" and records a .dat file for every frame. It will also output a line of text if it drops frames anywhere.
My cron task looks like this:
12 15 * * * ~/opencam.sh >> ~/out.txt
After attempting a few times I only see the initial message "Program launched" appear in my out.txt file. The .dat files however do not get generated and the error messages for dropped frames also do not appear.
I don't really have the strongest knowledge of the camera software as it was provided by the manufacturer, but is anyone able to provide insight as to why this approach might be faulty?
stdout
with>>
, notstderr
. The script is probably printing those messages tostderr
. See https://unix.stackexchange.com/questions/132511/how-to-capture-error-message-from-executed-command – Panki Dec 16 '22 at 15:16