Cron job doesn't run properly, when testing it from Scheduled Tasks or running automatically on a schedule - creates a zero-length empty gzip file (running mysqldump)
This is how to replicate it:
What am I doing wrong?
Thanks!
This is how to replicate it:
- Create a cron job, e.g.
mysqldump -h localhost -u rs_mst -ppasword rs_mst admin_custom performance-aum_custom | gzip > /etc/backups/daily/cust_funds/mst_`date -I`.gz
- Click Run Now (being on the same cron job page - not in the main Scheduled Tasks page)
- Everything runs perfectly, the gzip file is created.
- Click OK.
- Select that task on the Scheduled Tasks page and click Run Now (the button on the left, in the task table).
- It returns 'successfully completed', but the ceated gzip file is empty, has zero length.
- Adding a full path, i.e. /usr/bin/mysqldump makes no difference
- All folder permissions are 755, owner root:root.
What am I doing wrong?
Thanks!
Last edited: