New in CWP Edge-LatestFree with every CWPpro licenceWebsites up to 300x faster

CWP now includes LSPHP, LSAPI-Cache and CWP Cage at no extra cost with all CWPpro licences. The LSAPI-Cache plugin is integrated into our WordPress and other script installers, and CWP Cage gives every user complete isolation. Available now in the CWP Edge-Latest version.

Get CWPpro ›

Ongoing Issue With Crontab

Started by n0xr0x, April 28, 2019, 04:57:42 PM

Previous topic - Next topic

n0xr0x

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.

Igor S.

Hello.

You can ignore
Quotenginx: [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

pixelpadre

check /var/spool/cron for existence of cronjobs

pixelpadre

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

Igor S.

Quote from: pixelpadre 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

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

pixelpadre

#5
Yes I know.  I forgot to change the path to php.  But apart from that.....

Question is what exactly does that text equate to?

Igor S.


Quote from: pixelpadre on June 15, 2019, 09:21:38 PM
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

pixelpadre

I wasnt looking for a text output, I was looking for the command that was being invoked.  I am not familiar with crontab syntax.

Igor S.

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