0

I have cron job set to run every 30 secs.

But, it does not do anything.

I have confirmed the action works manually, just not when within cron.

full paths given, permissions are correct.

Below are both ways i have tried. Why might this not be working? (On Raspbian)

*/30 * * * * find /var/lib/motion/*.jpg -type f -mmin +1 -exec rm -v {} + | { printf "=%.0s"  $(seq 1 63) ; printf "\n" ; wc -l ; printf "items deleted - " ; date -u ; } >> /var/lib/motion/deleted.log;

*/30 * * * * find /var/lib/motion/*.jpg -type f -mmin +1 -delete + | { printf "=%.0s"  $(seq 1 63) ; printf "\n" ; wc -l ; printf "items deleted - " ; date -u ; } >> /var/lib/motion/deleted.log;

marked as duplicate by Michael Hampton May 23 at 0:02

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

Browse other questions tagged or ask your own question.