command line - Shell script runs well when triggered via terminal but not working as a cron - Ask Ubuntu


i using ubuntu 16.06 , here shell script:

#!/bin/sh  recordmydesktop --quick-subsampling --fps 3 --no-sound --on-the-fly-encoding --v_quality 40 -o /home/square/videos/test/rec_`date +%y%m%d_%h%m%s`.ogv 

when run script terminal ./script.sh goes , running.

however when place cronjob looking that:

*/1   *    *    *    *  /home/square/playground/script.sh &>/home/square/playground/mylog.log 

the command:

recordmydesktop --quick-subsampling --fps 3 --no-sound --on-the-fly-encoding --v_quality 40 -o /home/square/videos/test/rec_`date +%y%m%d_%h%m%s`.ogv 

is not working. have no idea why running when run script.sh terminal, not working via cron job.

do have idea how can fix ?

recordmydesktop records x-session started in.

processes started crontab don't have x-session.


Comments

Popular posts from this blog

download - Firefox cannot save files (most of the time), how to solve? - Super User

windows - "-2146893807 NTE_NOT_FOUND" when repair certificate store - Super User

sql server - "Configuration file does not exist", Event ID 274 - Super User