Page 1 of 1
Edit and add CRON return ERROR CODE 1
Posted: Wed Aug 28, 2019 9:53 am
by paulokruz
Hello,
Every time i add or edit one cron task in VESTA action is saved but return always ERROR CODE 1.
I can see cron work successful but the error alert is annoying.
My server is ubuntu 18.04 and VestaCP is up to date ( Version:0.9.8 (amd64) Release:25) .
How i can debug this problem ?
Re: Edit and add CRON return ERROR CODE 1
Posted: Thu Aug 29, 2019 4:58 am
by plutocrat
What I'd do is look in the vesta system log to find out the actual command that is run.
tail /var/log/vesta/system.log
Code: Select all
v-add-cron-job 'admin' '30' '11' 'autoupdate index.php reports' 'autoupdate index.php reports' 'autoupdate index.php reports' '/home/admin/scripts/null.sh'
That was one I added to my system and it looks a bit weird to me! Not sure what "autoupdate index.php reports" is doing in a field which is meant to contain a number!
Usage: v-add-cron-job USER MIN HOUR DAY MONTH WDAY COMMAND [JOB] [RESTART]
Anyway, so then I'd run that again manually from the command prompt to see if it gives me any more clues what the error was. In fact I'd use the correct format:
Code: Select all
v-add-cron-job 'admin' '30' '11' '*' '*' '*' '/home/admin/scripts/null.sh'
If there's no further information, I'd try running it with bash debug (warning ... a lot of output)
Code: Select all
bash -x $VESTA/bin/v-add-cron-job 'admin' '30' '11' '*' '*' '*' '/home/admin/scripts/null.sh'
These are things I'd try on my own system. Use at your own risk!