I installed Vtiger CRM on my server, and I want to set up a cron job to trigger Vtiger CRM's cron job script. What should I do to set up the cron job?
Our webcron service is best for triggering Vtiger CRM's cron job script. Just follow below simple steps to configure cron job for your Vtiger CRM:
A simpler way:
In file vtigercron.php, change the line
if(vtigercron_detect_run_in_cli() || (isset($_SESSION["authenticated_user_id"]) && isset($_SESSION["app_unique_key"]) && $_SESSION["app_unique_key"] == $application_unique_key)){
toif(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)){
and then use
A safer way:
In file vtigercron.php, change
the line
if(vtigercron_detect_run_in_cli() || (isset($_SESSION["authenticated_user_id"]) && isset($_SESSION["app_unique_key"]) && $_SESSION["app_unique_key"] == $application_unique_key)){
toif(vtigercron_detect_run_in_cli() || ($_REQUEST["password_for_easycron"] == "PASSWORD") || (isset($_SESSION["authenticated_user_id"]) && isset($_SESSION["app_unique_key"]) && $_SESSION["app_unique_key"] == $application_unique_key)){
and then use Some even safer ways also exist (e.g. using HTTP header to post the PASSWORD). You could find an appropriate solution for your situation.