Vesta Control Panel - Forum

Community Forum

Skip to content

Advanced search
  • Quick links
    • Main site
    • Github repo
    • Google Search
  • FAQ
  • Login
  • Register
  • Board index Main Section General Discussion
  • Search

Cron suddennly not run

General questions about VestaCP
Post Reply
  • Print view
Advanced search
8 posts • Page 1 of 1
maniek015
Posts: 35
Joined: Sun Aug 21, 2016 5:35 am

Cron suddennly not run
  • Quote

Post by maniek015 » Sun Aug 21, 2016 5:40 am

Hello.
I have a problem with a CRON. He is suddennly not run. Two days ago all work's perfectly and I don't make a changes in the settings server, Vesta or CRON. Now i have in cron.log this error :

Aug 20 19:50:01 xshare cron[491]: (admin) ERROR (Syntax error, this crontab file will be ignored)
Aug 20 19:50:40 xshare cron[10027]: (CRON) INFO (pidfile fd = 3)
Aug 20 19:50:40 xshare cron[10027]: Error: bad day-of-month; while reading crontab for user admin
Aug 20 19:50:40 xshare cron[10027]: (admin) ERROR (Syntax error, this crontab file will be ignored)
Aug 20 19:50:40 xshare cron[10027]: (CRON) INFO (Skipping @reboot jobs -- not system startup)
Aug 20 19:52:01 xshare cron[10027]: (admin) RELOAD (crontabs/admin)
Aug 20 19:52:01 xshare cron[10027]: Error: bad day-of-month; while reading crontab for user admin
Aug 20 19:52:01 xshare cron[10027]: (admin) ERROR (Syntax error, this crontab file will be ignored)
Aug 20 19:53:01 xshare cron[10027]: (admin) RELOAD (crontabs/admin)
Aug 20 19:53:01 xshare cron[10027]: Error: bad day-of-month; while reading crontab for user admin
Aug 20 19:53:01 xshare cron[10027]: (admin) ERROR (Syntax error, this crontab file will be ignored)
Aug 20 19:53:26 xshare cron[11498]: (CRON) INFO (pidfile fd = 3)
Aug 20 19:53:26 xshare cron[11498]: Error: bad day-of-month; while reading crontab for user admin


I try a few cron commands.. /php , wget , /use/bin/php and still dont work. Two days ago its work's..


Please help me find a solution :)
Top

Felix
Posts: 134
Joined: Tue Aug 04, 2015 7:15 pm

Os: Ubuntu 16x
Web: apache + nginx
Re: Cron suddennly not run
  • Quote

Post by Felix » Sun Aug 21, 2016 7:26 am

Whenever you post some error or you need help, it's really important for you to be as specific as possible and to provide information like the Operating System you're using, Vesta version, etc.

I suppose there is something wrong with the admin crontab. Run the following command to display the admin's crontab and copy/paste here the output, so we can see what's wrong. Omit any personal information (e.g. email address)

If using Ubuntu

Code: Select all

cat /var/spool/cron/crontabs/admin
If using CentOS

Code: Select all

cat /var/spool/cron/admin
Top

maniek015
Posts: 35
Joined: Sun Aug 21, 2016 5:35 am

Re: Cron suddennly not run
  • Quote

Post by maniek015 » Sun Aug 21, 2016 7:30 am

Thank's for reply.
I have a Debian 8.5 with VestaCP 0.9.8-16


root@xshare:~# cat /var/spool/cron/crontabs/admin
MAILTO=mateusz.maniecki@gmail.com
15 02 02 * * sudo /usr/local/vesta/bin/v-update-sys-queue disk
15 00 00 * * sudo /usr/local/vesta/bin/v-update-sys-queue traffic
30 03 * * * sudo /usr/local/vesta/bin/v-update-sys-queue webstats
*/5 * * * * sudo /usr/local/vesta/bin/v-update-sys-queue backup
0 4 * * 1 sudo /usr/local/vesta/bin/v-backup-users
20 00 * * * sudo /usr/local/vesta/bin/v-update-user-stats
*/5 * * * * sudo /usr/local/vesta/bin/v-update-sys-rrd
5 0 * * * php /home/admin/web/mydomain/public_html/admin/tasks/auto_prune.cron.php >> /dev/null 2>&1
10 0 * * * php /home/admin/web/mydomain/public_html/admin/tasks/create_internal_notifications.cron.php >> /dev/null 2>&1
15 0 * * * php /home/admin/web/mydomain/public_html/admin/tasks/delete_redundant_files.cron.php >> /dev/null 2>&1
25 0 * * * php /home/admin/web/mydomain/public_html/admin/tasks/downgrade_accounts.cron.php >> /dev/null 2>&1
*/5 * * * * php /home/admin/web/mydomain/public_html/admin/tasks/process_file_queue.cron.php >> /dev/null 2>&1
0 1 * * * php /home/admin/web/mydomain/public_html/admin/tasks/create_email_notifications.cron.php >> /dev/null 2>&1
Top

Felix
Posts: 134
Joined: Tue Aug 04, 2015 7:15 pm

Os: Ubuntu 16x
Web: apache + nginx
Re: Cron suddennly not run
  • Quote

Post by Felix » Sun Aug 21, 2016 10:52 am

It seems the second entry is wrong. Highlighted and underlined the mistake:
15 00 00 * * sudo /usr/local/vesta/bin/v-update-sys-queue traffic

You're asking for day 0 of the month, which does not exist. You can check your crontabs with http://crontab.guru/

Moreover I'm not sure if these php statements will work. I think you need to specify the full path to the executable /usr/bin/php (or wherever that is in your distribution) instead of just the php executable
Top

maniek015
Posts: 35
Joined: Sun Aug 21, 2016 5:35 am

Re: Cron suddennly not run
  • Quote

Post by maniek015 » Sun Aug 21, 2016 11:04 am

I generate this cron with Vesta. Cron with /usr/bin/php don't work too.

All the Cron job don't work, not only this
Top

maniek015
Posts: 35
Joined: Sun Aug 21, 2016 5:35 am

Re: Cron suddennly not run
  • Quote

Post by maniek015 » Sun Aug 21, 2016 11:07 am

And all this cronjob work's 2 days ago. I not made any change for cron.
Top

Felix
Posts: 134
Joined: Tue Aug 04, 2015 7:15 pm

Os: Ubuntu 16x
Web: apache + nginx
Re: Cron suddennly not run
  • Quote

Post by Felix » Sun Aug 21, 2016 2:50 pm

Did you correct the mistake I noted on my previous message? If any job has an error, then none of them will execute.
Top

maniek015
Posts: 35
Joined: Sun Aug 21, 2016 5:35 am

Re: Cron suddennly not run
  • Quote

Post by maniek015 » Sun Aug 21, 2016 3:37 pm

Now it's run! I made a change and now all cron's work perfectly!
Thanks a lot !
Top


Post Reply
  • Print view

8 posts • Page 1 of 1

Return to “General Discussion”



  • Board index
  • All times are UTC
  • Delete all board cookies
  • The team
Powered by phpBB® Forum Software © phpBB Limited
*Original Author: Brad Veryard
*Updated to 3.2 by MannixMD
 

 

Login  •  Register

I forgot my password