Non sempre Vtiger riesce a funzionare correttamente al primo colpo utilizzando i CronJob e questo dipende dal servizio hosting e dalle versioni PHP in uso.
E’ bene specificare che alcuni servizi Hosting utilizzano versioni PHP diverse a livello di SSH rispetto al WWW.
Se riscontrate problemi di Access Denied lanciando il comando Vtigercron.php potete procedere come segue:
Attenzione: a causa di WordPress il codice non risulta perfettamente leggibile, si consiglia quindi di scaricare il file seguente da cui poter copiare il codice.
Aprire vtigercron.php e cercare
if(vtigercron_detect_run_in_cli() || (isset($_SESSION["authenticated_user_id"]) && isset($_SESSION["app_unique_key"]) && $_SESSION["app_unique_key"] == $application_unique_key)){
Sostituire il tutto con quanto segue:
if(vtigercron_detect_run_in_cli() || ($_REQUEST["app_unique_key"] == $application_unique_key) || (isset($_SESSION["authenticated_user_id"]) && isset($_SESSION["app_unique_key"]) && $_SESSION["app_unique_key"] == $application_unique_key)){
Avrete bisogno poi dell App Unique Key
Potrete trovare la vostra app_unique_key nel file config.inc.php.
Aprire config.inc.php e cercare “$application_unique_key”.
Ora potete eseguire il Cron Job
Aprire il browser e digitare nella barra degli indirizzi http://www.example.com/vtigercron.php?app_unique_key=xxxxxxxxxxxxxxxxxxxxx
Note aggiuntive:
Potrebbe essere necessario modificare anche il file Vtigercron.sh facendo riferimento alla versione PHP in uso.
Il file Vtigercron.sh potrebbe assomigliare al seguente:
export VTIGERCRM_ROOTDIR=dirname "$0"/..
#export USE_PHP=php
#export USE_PHP=/usr/bin/php
export USE_PHP=php5
cd $VTIGERCRM_ROOTDIR
#TO RUN ALL CORN JOBS
$USE_PHP -f vtigercron.php
Potrebbe inoltre essere necessario apportare la seguente modifica:
- Go to vtlib/Vtiger/Cron.php
- Go function - isRunnable()
- after
if (!$this->isDisabled()) {
- add
return true;
Altre fonti: http://support-crm.blogspot.com/2016/01/vtiger-scheduler-cron-job-not-working.html
http://support-crm.blogspot.com/2016/01/vtiger-scheduler-cron-job-not-working.html
Esempi di cronjob funzionanti in DirectAdmin:
* | * | * | * | * | wget http://vtiger.marosomarco.it/vtigercron.php?app_unique_key=e1d2e6311231342ad0c2cc1dae379 | |
5 | * | * | * | * | /home/marosoma/domains/marosomarco.it/public_html/ziliolisrl/cron/vtigercron.sh | |
30 | * | * | * | * | /home/marosoma/domains/marosomarco.it/public_html/vtiger/cron/vtigercron.sh | |
30 | * | * | * | * | wget -O – -q http://vtiger.marosomarco.it/vtigercron.php?app_unique_key=e1d2e6682342342340c2cc1dae379 | |
30 | * | * | * | * | usr/local/bin/php -q http://vtiger.marosomarco.it/vtigercron.php?app_unique_key=e1d22342342422cc1dae379 |
https://forum.directadmin.com/threads/how-do-i-set-the-cron-jobs.16939/