I am making backups of all databases of MySQL into separate gnu-zip files using crontab. I also want to delete backup files older then 1 day.
I am using below command to delete the old files, but it only works through terminal. If I set cronjob for same command then it does not work. I don't know what is wrong. Going on my command is below:
find path -type f -mtime +0 -delete
I also can't find any fault in setting up cronjob:
0 0 * * * /path/auto_delete_backup_database.sh >/path/auto_delete_backup_database.log
any help will be appreciated.
UPDATE
as @Kusalananda mentioned i ran ls -l and result is as displayed in below screen shot
So is it because .sh file does not have required permission to be executed? if so, how can I grant that permission?
