I'm trying to run an sh file to move files around with scheduled tasks. See GUI pic. The result from "run Selected Task" is:
/tmp/tmp8yj5zs: line 1: /home/dan/Foscam/move-video.sh: Permission denied
Press ENTER to continue and close this window.
If I add sudo to the front I get:
sudo: /home/dan/Foscam/move-video.sh: command not found
Press ENTER to continue and close this window.
The Sh file is
#!/bin/bash
/usr/bin/find /home/foscam/FI9803P_C4D655404959/record/ -type f -mtime +3 -exec mv '{}' /home/dan/Foscam/Week_2/ \;
/usr/bin/find /home/dan/Foscam/Week_2/ -type f -mtime +3 -exec mv '{}' /home/dan/Foscam/Week_3/ \;
/usr/bin/find /home/dan/Foscam/Week_3/ -type f -mtime +3 -exec mv '{}' /home/dan/Foscam/Week_4/ \;
/usr/bin/find /home/dan/Foscam/Week_4/ -type f -mtime +3 -exec rm -f {} \;
Can anyone suggest what I'm doing wrong?
It does not seem like images is working for me so the command is home/dan/Foscam/move-video.sh
run as Xapplication
#!/bin/sh
at the top of the file seems to do the same.
/home/dan/Foscam/move-video.sh
is working? did you try addingbash
tobash /home/dan/Foscam/move-video.sh
in TASK command section? does the script is executable? – αғsнιη Jul 28 '17 at 5:08/home/foscam/FI9803P_C4D655404959/record/
in result!! be aware of this – αғsнιη Jul 28 '17 at 19:35