Crontab setup vTiger Print

  • 296

Setting up crontab for vTiger so that the schedular will work.

In cPanel click Cron icon
Click add cron job
enter the command "sh /home/%username%/public_html/%dir%/cron/vtigercron.sh" (%username% = cpanel login, %dir% = vTiger directory or folder if it is not installed in the root of the domain)
Enter */10 * * * * ( this will run the command every 10 minutes, every hour of every day of every week of every month.)

This sets up cron, BUT you are not done yet.

In cPanel click File Manager.
browse to vTiger root and select vtigercron.php Click copy at the top of the page, create a copy like vtigercron.php.bak (THis is a backup of the original file, in case something goes wrong the original file can be restored)

Select vtigercron.php Click Code editor at the top of the page.

Find:
if(PHP_SAPI === "cli" || (isset($_SESSION["authenticated_user_id"]) &&   isset($_SESSION["app_unique_key"]) && $_SESSION["app_unique_key"] == $application_unique_key)){

and replace with:
if(PHP_SAPI === "cli" || !isset($_SERVER['REMOTE_ADDR']) || (isset($_SESSION["authenticated_user_id"]) &&   isset($_SESSION["app_unique_key"]) && $_SESSION["app_unique_key"] == $application_unique_key)){

Click Save


Still not done, Next in File Manager select config.inc.php create a backup copy, same way as before.

Select config.inc.php, click Code Editor
Find in DB settings:
'localhost'

Replace with:
'127.0.0.1'

Click save.

If there are any issues please contact Support.

Was this answer helpful?

« Back