vtiger510:Cron
From http://wiki.vtiger.com/archives
This documentation applies to vtigerCRM 5.2.1 and vtigerCRM 5.2.0
Contents |
Setup Cron Job
The following set up for cronjob setting is only shown for Recurring Invoice feature.You can try the same procedure to set up cronjob for Workflow and Mail Scanner feature.
Windows
Step 1:
Goto All Programs -> Accessories -> System Tools -> Scheduled Tasks
Step 2:
Click on Add Scheduled Task
You will get a popup, click on Next button.
Step 3:
In Scheduled Task Wizard window, browse for the task for which you want to create a scheduler (Path of the Batch file for the task)
Eg: For Recurring Invoice Batch File -> <vtigercrm-source-directory>/cron/modules/SalesOrder/RecurringInvoice.bat
Step 4:
Rename the name of the task as per your requirement (preferably preceding with Vtiger for vtiger scheduled tasks) and set the frequency at which the task has to be called. Also set the time at which the scheduler needs to be called.
Eg: Frequency would be 'Daily' in case of Recurring Invoice
Step 5:
In the next step, give proper Windows user credentials.
Step 6:
Once you get confirmation window, click on finish button.
| NOTE:
If you have Vtiger bundled exe build installed on your server/system, all required tasks for Vtiger will already be added. Check the configuration of the Scheduled task, if it is not working properly. |
*nix
crontab -e
This will open up a file which will have the list of configured cron jobs. Add the jobs to the list as follows:
m h dom mon dow <vtigercrm-source-directory>/<path-to-the-shell-script>
For e.g
- * * * * * sh home/vtiger/vtigerCRM5/apache/htdocs/vtigerCRM/cron/modules/SalesOrder/RecurringInvoiceCron.sh
m → minutes
h → hours
dom → day of month
mon → month
dow → day of week
Values for all these 5 fields are compulsory and should be numbers. If you do not want to specify value of any of these fields, you can use * to replace the number.
Eg: 30 * * * * → Indicates that the cron job has to be run for every 30 minutes.
<path-to-the-shell-script> -> Path to the shell script w.r.t Vtiger source directory (Eg: Path to shell script is cron/modules/SalesOrder/RecurringInvoice.sh for Recurring Invoice)
To know how to set cron job for Send Reminder Option in Calendar Events please go to Cron Reminder documentation
Important Elements affecting Cron Job
- Default time zone in config.inc.php
-> This has to be set to the proper timezone of the server.
- App key in config.cron.php
-> This has to be set to the correct application key from config.in.php file.




