Author Topic: Ongoing Issue With Crontab  (Read 678 times)

0 Members and 1 Guest are viewing this topic.

Offline
*
Ongoing Issue With Crontab
« on: April 28, 2019, 04:57:42 PM »
So, I wasn't sure where to post this, but I've been having an ongoing issue with Crontab / Cron jobs.

Cron was working perfectly fine up until recently. I'm not sure what exactly changed, I logged in and saw there was updates available for my server and I was unable to update via the control panel, so I went in to SSH.

In SSH I received the following error:
nginx: [warn] the “ssl” directive is deprecated, use the “listen … ssl” directive instead

Came across this thread -
https://community.easyengine.io/t/solution-nginx-warn-the-ssl-directive-is-deprecated-use-the-listen-ssl-directive-instead/10784

that didn't work.

From there, I figured okay, maybe it's just crontab in general.

When I go to CWP and try to add a cronjob, there's no error or anything when I login as root - it doesn't add the cron job anywhere though. Not in CWP nor in the crontab logs / active crons

When I login under a user account and go to add a cron and go to "Crontab for user" I receive the following error:
"Your tasks can not be executed until you solve the error that is presented"

but there is no error(s) shown.

So then I go in and add a cronjob via SSH - last ditch effort.
* */2 * * * curl http://LINK/to/file.php

and it's supposed to run every two hours but it's running every 15 minutes or so, and yet again, in the CWP backend it's not showing under the user account nor the root user when logged in to root, or in to the user account itself.

When I go in to SSH and use the command -
crontab -u USERNAMEHERE -l
it shows the cronjob as active / in the list.

Now finally, when I figure okay, maybe it's just a display issue or something, I check the log file using the command -
tail -n 20 /var/log/cron

According to the log, the cron job was never ran.

Does any one have any ideas or suggestions? I'm at my wits end with this.

Offline
*****
Re: Ongoing Issue With Crontab
« Reply #1 on: April 29, 2019, 05:43:04 AM »
Hello.

You can ignore
Quote
nginx: [warn] the “ssl” directive is deprecated, use the “listen … ssl” directive instead

Try to run in console: curl http://LINK/to/file.php and check what happens.
You can ask me to solve any problem with your server for some money in pm  ;)
Services Monitoring & RBL Monitoring
http://centos-webpanel.com/services-monitor
Join our Development Team and get paid !
http://centos-webpanel.com/develope-modules-for-cwp

Installation Instructions
http://centos-webpanel.com/installation-instructions
Get Fast Support Here
http://centos-webpanel.com/support-services

Offline
****
Re: Ongoing Issue With Crontab
« Reply #2 on: May 13, 2019, 08:05:43 PM »
check /var/spool/cron for existence of cronjobs

Offline
****
Re: Ongoing Issue With Crontab
« Reply #3 on: June 13, 2019, 11:01:45 AM »
What exactly does this cron do? 

0 0 * * 0 usr/local/php5/bin/php /home/your_username/public_html/index.php -p cron -t weekly

Offline
*****
Re: Ongoing Issue With Crontab
« Reply #4 on: June 14, 2019, 10:31:14 AM »
What exactly does this cron do? 

0 0 * * 0 usr/local/php5/bin/php /home/your_username/public_html/index.php -p cron -t weekly

That's won't work with CWP.
You can ask me to solve any problem with your server for some money in pm  ;)
Services Monitoring & RBL Monitoring
http://centos-webpanel.com/services-monitor
Join our Development Team and get paid !
http://centos-webpanel.com/develope-modules-for-cwp

Installation Instructions
http://centos-webpanel.com/installation-instructions
Get Fast Support Here
http://centos-webpanel.com/support-services

Offline
****
Re: Ongoing Issue With Crontab
« Reply #5 on: June 15, 2019, 09:21:38 PM »
Yes I know.  I forgot to change the path to php.  But apart from that.....

Question is what exactly does that text equate to?
« Last Edit: June 15, 2019, 09:24:05 PM by pixelpadre »

Offline
*****
Re: Ongoing Issue With Crontab
« Reply #6 on: June 17, 2019, 06:31:29 AM »

Question is what exactly does that text equate to?

Who knows... Try to talk to the website (CMS) developers ;)
You can ask me to solve any problem with your server for some money in pm  ;)
Services Monitoring & RBL Monitoring
http://centos-webpanel.com/services-monitor
Join our Development Team and get paid !
http://centos-webpanel.com/develope-modules-for-cwp

Installation Instructions
http://centos-webpanel.com/installation-instructions
Get Fast Support Here
http://centos-webpanel.com/support-services

Offline
****
Re: Ongoing Issue With Crontab
« Reply #7 on: June 17, 2019, 11:06:24 AM »
I wasnt looking for a text output, I was looking for the command that was being invoked.  I am not familiar with crontab syntax.

Offline
*****
Re: Ongoing Issue With Crontab
« Reply #8 on: June 18, 2019, 09:14:49 AM »
So, first of all, try to restart crontab daemon by command: service crond restart
Then I would suggest adding crons via CWP. It has not bad GUI ;)
You can ask me to solve any problem with your server for some money in pm  ;)
Services Monitoring & RBL Monitoring
http://centos-webpanel.com/services-monitor
Join our Development Team and get paid !
http://centos-webpanel.com/develope-modules-for-cwp

Installation Instructions
http://centos-webpanel.com/installation-instructions
Get Fast Support Here
http://centos-webpanel.com/support-services