Wednesday, February 6, 2019

vTiger 7.1.0 increase scheduler frequency

vTiger is pretty darn good.  So many things you can do with it.  One thing that is great is its automation scheduler.   Interestingly, and annoyingly, the minimum frequency seems to be coded default to 15 minutes.

For a CRM, a 15 minute wait before a scheduled task will be checked and run is an eternity!  Fortunately, if you are having issues with the long wait, you can change it to happen every 1 minute.  That 50 seconds too long still for some jobs, but is what it is.

1>  Open up the file:

/var/www/html/vtigercrm/config.inc.php

This is assuming that is where it lives.  If you aren't really sure on your server, you can type
cd /
find | grep config.inc.php

You may get a few of them return, but the one you are probably looking for will probably be in a vtiger(ish) referenced directory. 


2>  Towards the bottom you will see items like:
// Maximum time limit for PHP script execution (in seconds) 
$php_max_execution_time = 0;
// Set the default timezone as per your preference
$default_timezone = 'UTC';
Add in this line:

$MINIMUM_CRON_FREQUENCY = 1;

And then save your changes.

Now edit your crontab
crontab -e

and you should see an entry LIKE
* 15 * * * /bin/sh /var/www/html/vtigercrm/cron/vtigercron.sh

Change the 15 portion to :

* * * * * /bin/sh /var/www/html/vtigercrm/cron/vtigercron.sh

Save your changes

restart crontab in Centos 7
service crond restart

Back in vTIGER - AUTOMATION - SCHEDULER

click on the 'pencil' to edit a job.  and now you can change it from 15 minutes minimum, to 1 minute minimum.

Done!

No comments:

Post a Comment