Author Topic: Cron job not working right  (Read 4062 times)

0 Members and 1 Guest are viewing this topic.

Offline
*
Cron job not working right
« on: November 28, 2021, 11:44:16 PM »
cant get the cron job stay working

only time it works when i hit the go button ?
« Last Edit: November 28, 2021, 11:47:43 PM by james88 »

Offline
*
Re: Cron job not working right
« Reply #1 on: November 29, 2021, 09:54:44 AM »
make sure you are using ful paths and also check it in the cron files
/var/spool/cron/USERNAME
VPS & Dedicated server provider with included FREE Managed support for CWP.
http://www.studio4host.com/

*** Don't allow that your server or website is down, choose hosting provider with included expert managed support for your CWP.

Offline
*
Re: Cron job not working right
« Reply #2 on: November 29, 2021, 02:16:34 PM »
*/5 * * * * /opt/alt/php-fpm74/usr/php -q /home/xxx/whmcs/crons/cron.php schedule:run 2>&1  #whmcs main
*/5 * * * * /usr/local/bin/php -q /home/xxx/public_html/modules/addons/thesslstorefullv2_admim/tss_cron schedule:run 2>&1
*/5 * * * * /usr/bin/php -q /home/xxx/public_html/modules/addons/thesslstorefullv2_admim/tss_cron.php schedule:run 2>&1
*/5 * * * * /opt/alt/php-fpm74/usr/php -q /home/xxx/whmc/cron/cron.php


only one that works but dont run on schedule  permissions are set
*/5 * * * * /usr/bin/php -q /home/xxx/whmcs/crons/cron.php schedule:run 2>&1

Offline
*
Re: Cron job not working right
« Reply #3 on: November 29, 2021, 02:27:21 PM »
you can have different issues, related to extensions or wrong path..you would need to check php path for bin file

example
/opt/alt/php-fpm74/usr/bin/php
/opt/alt/php74/usr/bin/php-cgi

you will need to check with some experienced sysadmin or cwp support
VPS & Dedicated server provider with included FREE Managed support for CWP.
http://www.studio4host.com/

*** Don't allow that your server or website is down, choose hosting provider with included expert managed support for your CWP.

Offline
*****
Re: Cron job not working right
« Reply #4 on: November 29, 2021, 02:28:07 PM »
Hi I see you've incorrect path to php binary : "/opt/alt/php-fpm74/usr/php" corerct is "/opt/alt/php-fpm74/usr/bin/php"

also for this run in putty ssh and see what you get ensure login as user xxx via ssh then run this command (you can enable shell access from cwp admin) :
/usr/local/bin/php -q /home/xxx/public_html/modules/addons/thesslstorefullv2_admim/tss_cron schedule:run 2>&1

Offline
*
Re: Cron job not working right
« Reply #5 on: November 29, 2021, 02:49:02 PM »
ok  can some one tell me what cron job missing in the root cron try running it in root but gone delete old cron and didnt delete right one

24 17 * * * /usr/local/cwp/php71/bin/php -d max_execution_time=18000 -q /usr/local/cwpsrv/htdocs/resources/admin/include/cron_autossl_all_domains.php

0 0 * * * /usr/local/cwp/php71/bin/php -d max_execution_time=18000 -q /usr/local/cwpsrv/htdocs/resources/admin/include/alertandautorenewssl.php

37 0 * * * /root/.acme.sh/acme.sh --cron --home /root/.acme.sh > /dev/null

Offline
*
Re: Cron job not working right
« Reply #6 on: November 29, 2021, 03:07:58 PM »
 "/opt/alt/php-fpm74/usr/bin/php" dont work ? only one works is /usr/local/bin/php -q /home/xxx/public_html/crons/cron.php
but this wont run at all /usr/local/bin/php -q /home/xxx/public_html/modules/addons/thesslstorefullv2_admim/tss_cron schedule:run 2>&1


Hi I see you've incorrect path to php binary : "/opt/alt/php-fpm74/usr/php" corerct is "/opt/alt/php-fpm74/usr/bin/php"

also for this run in putty ssh and see what you get ensure login as user xxx via ssh then run this command (you can enable shell access from cwp admin) :
/usr/local/bin/php -q /home/xxx/public_html/modules/addons/thesslstorefullv2_admim/tss_cron schedule:run 2>&1

Offline
*
Re: Cron job not working right
« Reply #7 on: November 29, 2021, 03:20:23 PM »
panel junk you put command in set it reload the page back to old command back wtf


Offline
*
Re: Cron job not working right
« Reply #8 on: November 29, 2021, 03:44:06 PM »
some time when you go back to fix a long command text some of the command is deleted like end of the command is gone like there a max characters

Offline
*
Re: Cron job not working right
« Reply #9 on: November 29, 2021, 08:03:54 PM »
omg 6 os reinstalls and now this cron job wants to work

/usr/bin/php -q /home/xxx/public_html/crons/cron.php
/usr/bin/php -q /home/xxx/public_html/modules/addons/thesslstorefullv2_admin/tss_cron.php


centos 7.9
php 7.4.26