Question Deleting files via a scheduled task

Currently reading
Question Deleting files via a scheduled task

4
3
NAS
DS120J
Operating system
  1. Windows
Mobile operating system
  1. Android
I've configured the security adviser on my NAS to run a scan every night at midnight, and e-mail the results.

I've set it to store the files in a folder in my home directory, which is mapped as a share on my laptop.

I now want to delete all the reports at 11:30 every night, but I can't get this working for some reason.

I've written a bash script in an attempt to do this, with the following command in it:
Code:
rm -rf volume1/homes/vista/drive/reports/sareport/report/daily/*

I've then created a scheduled task, and set it to run the file at 11:30 every night.

However, I'm getting the following error when the script runs:

Current status: 127 (Interrupted)
Standard output/error:
bash: /homes/vista/Drive/deleteoldreports.sh: No such file or directory

Does anyone know where i'm going wrong? I did think it could be due to the bash script not being executable, but i've set the executable bit on the file while logged in via ssh.
 

Create an account or login to comment

You must be a member in order to leave a comment

Create account

Create an account on our community. It's easy!

Log in

Already have an account? Log in here.

Similar threads

I found this. Interesting as it seems many modern synology boxes should be able to sync 1-5million files...
Replies
1
Views
1,099
Duh.. you are obviously quite correct. Somehow missed it. Thanks
Replies
7
Views
965
Snapshot consumption can only be determined through the package itself... AFAIK, snapshots can only be...
Replies
10
Views
1,855
Got a response from Synology support, the .xz file is a Linux compressed format. Use 7zip to uncompress it.
Replies
6
Views
1,787
  • Question
OK, I'm now seeing something I recognize. There was no reason to start with the /var/services/...
Replies
5
Views
2,174
  • Question
Hopefully the subject line makes some sense. The issue is that I can't see the sync'd link files in DSM...
Replies
0
Views
1,240
D
  • Question
You could look into /var/logs/ path via ssh. Maybe there are some logs there regarding Media, along all...
Replies
1
Views
2,133

Welcome to SynoForum.com!

SynoForum.com is an unofficial Synology forum for NAS owners and enthusiasts.

Registration is free, easy and fast!

Back
Top