I am using the following code for task scheduler to auto delete FTP video recordings of surveillance cameras.
It works great however when the task runs I do not get a proper output of what was deleted in the email. This is what I get instead...
As you can see above the output is blank. If I run the task manually and look at the logged output with task scheduler it displays exactly what was deleted. But the email I receive doesn't. Am I missing something?
Thank you
Code:
find /volume1/VideoCameraRecordings/ -type f -mtime +7 -delete
find /volume1/VideoCameraRecordings/ -depth -type d -exec rmdir {} \; 2>/dev/null
It works great however when the task runs I do not get a proper output of what was deleted in the email. This is what I get instead...
Code:
Task Scheduler has completed a scheduled task.
Task: Auto Delete 1 Week Old Files From VideoCameraRecordings Folder
Start time: Thu, 02 Dec 2021 03:00:01 GMT
Stop time: Thu, 02 Dec 2021 03:00:16 GMT
Current status: 0 (Normal)
Standard output/error:
From NASHomeServer
As you can see above the output is blank. If I run the task manually and look at the logged output with task scheduler it displays exactly what was deleted. But the email I receive doesn't. Am I missing something?
Thank you