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:
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:
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.
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.