[Request] How to Setup whmcs Cronjob in CWP crontab?

Started by Anava, July 29, 2019, 01:42:23 PM

Previous topic - Next topic

Anava

Hi team my whmcs cron don´t work could you help me which is the right path?.

this is my cron job: */5 * * * * /usr/bin/php -q /home/anava/public_html/app.mydomain.co/crons/cron.php



Anava

Solved I add the following path works for me: opt/alt/php-fpm71/usr/bin/php -q

and the cron job looks like this:

*/5 * * * * opt/alt/php-fpm71/usr/bin/php -q  /home/anava/public_html/subdomain.**yourdomain**.co/crons/cron.php

I hope that works for you! :)

bellafronte

Hi,

I have the same issue, but not only in WHMCS. In fact, any of my cron jobs on any server or account is running.

cat /var/log/cron

the cron log is:


Jan 12 14:00:52 forseti crond[77]: (CRON) INFO (RANDOM_DELAY will be scaled with factor 68% if used.)
Jan 12 14:00:52 forseti crond[77]: (CRON) INFO (running with inotify support)
Jan 12 14:01:01 forseti CROND[992]: (CRON) CAN'T FORK (child_process): Resource temporarily unavailable
Jan 12 14:01:01 forseti CROND[993]: (CRON) CAN'T FORK (child_process): Resource temporarily unavailable
Jan 12 14:02:01 forseti CROND[1091]: (CRON) CAN'T FORK (child_process): Resource temporarily unavailable
Jan 12 14:02:01 forseti CROND[1092]: (CRON) CAN'T FORK (child_process): Resource temporarily unavailable
Jan 12 14:03:01 forseti CROND[1431]: (CRON) CAN'T FORK (child_process): Resource temporarily unavailable
Jan 12 14:03:01 forseti CROND[1430]: (CRON) CAN'T FORK (child_process): Resource temporarily unavailable
Jan 12 14:04:02 forseti CROND[1540]: (CRON) CAN'T FORK (child_process): Resource temporarily unavailable
Jan 12 14:04:02 forseti CROND[1541]: (CRON) CAN'T FORK (child_process): Resource temporarily unavailable
Jan 12 14:05:01 forseti CROND[1640]: (CRON) CAN'T FORK (child_process): Resource temporarily unavailable
Jan 12 14:05:01 forseti CROND[1639]: (CRON) CAN'T FORK (child_process): Resource temporarily unavailable
Jan 12 14:06:01 forseti CROND[1751]: (CRON) CAN'T FORK (child_process): Resource temporarily unavailable
Jan 12 14:06:01 forseti CROND[1750]: (CRON) CAN'T FORK (child_process): Resource temporarily unavailable
Jan 12 14:07:01 forseti CROND[1857]: (CRON) CAN'T FORK (child_process): Resource temporarily unavailable
Jan 12 14:07:01 forseti CROND[1856]: (CRON) CAN'T FORK (child_process): Resource temporarily unavailable


I research for several different causes for this output, most of the solutions is increasing the security limits or UserTasksMax but doesn't work for me.

Do you have configured or personalized some security limits?

ontarget

Had this same issue as well.
I manually ran the cron using SSH
/usr/local/bin/php -q /home/XXXXX/public_html/clients/crons/cron.php

Which gave the error
Site error: the ionCube PHP Loader needs to be installed. This is a widely used PHP extension for running ionCube protected PHP code, website security and malware blocking.

Please visit get-loader.ioncube.com for install assistance.


So i then searched for a php version with ionCube

find /usr/ -type f -name "php" 2>/dev/null | grep bin
/usr/local/bin/php
/usr/local/cwp/php71/bin/php


so I checked if it had ionCube

/usr/local/cwp/php71/bin/php -v
PHP 7.2.30 (cli) (built: Apr 29 2020 02:29:42) ( NTS )
Copyright (c) 1997-2018 The PHP Group
Zend Engine v3.2.0, Copyright (c) 1998-2018 Zend Technologies
    with the ionCube PHP Loader + ionCube24 v13.0.2, Copyright (c) 2002-2023, by ionCube Ltd


Which it does so i can update my cron to:

/usr/local/cwp/php71/bin/php -q /home/XXXXX/public_html/clients/crons/cron.php


So now my Automation works in WHMCS

overseer