Articles in this section
Server Scripts & Jobs Overview Using Custom Server Scripts in Processes, Workflows, and Approvals Writing Code for Server Scripts and Jobs Helper Method for Server Scripts and Jobs - Debugging Helper Method for Server Scripts and Jobs - HTTP Request Helper Methods for Server Scripts and Jobs - Vtiger REST API Server Scripts Example - Contact Email Validation and Data Enrichment Server Scripts Example - Update Credit Score of a Contact Server Scripts Example - Calculate Organization Outstanding Invoice Amount Server Scripts Example - Set Case SLA by Created Day Server Jobs Example - Importing Daily Leads from a File Server Jobs Example - Update Stocks Weekly in Warehouse System Server Side Scripts & Jobs User Guide

Running Custom Background Tasks with Vtiger Server Jobs

This article gives you an overview of the Server jobs in Vtiger CRM to run custom background tasks.
A
Abdul Sameer
14 May, 2026 - Updated  5 months ago

Feature Availability

Vtiger Editions: One Growth | One Professional | One Enterprise | One AI

Introduction

Server Jobs are background jobs which run periodically based on configured frequency (hourly, daily, weekly, etc). This should be used for heavy and periodic operations like fetching data from external services and creating them in CRM, or sending specific data based on a particular logic to external services, etc.

These are run in the background and no CRM operation is blocked. Based on configured frequency, they are picked and sent to service for execution. Service queues them and executes based on its own load. After execution, the service sends the result back to the CRM. No user or record data is passed to the script, and it runs in the owner user context.

Use Cases

Here are a few examples of how Server Jobs can be used:
  • Update available stock information in the warehouse system weekly.
  • Import daily leads from a website into the CRM.
  • Generate periodic reports using CRM data based on custom business logic.
  • Send CRM data to external services at scheduled intervals.
  • Sync customer or order information between CRM and third-party applications.
In this article, you will learn about:
  • Creating Server Jobs

Creating Server Jobs

You can create server jobs in the Server Jobs module in the CRM.
Follow these steps to create a new server job:

  1. Log in to the CRM.
  2. Click the main Menu.
  3. Click Platform.
  4. Select Server Jobs. You will see a list of available server jobs.
  5. Click the Add Server Job.
  6. Enter or select information for the following
    1. Job Name: Enter a name for the job.
    2. Assigned to: Select a user from the drop-down to assign the job.
    3. Frequency: Select a frequency from the drop-down and select the desired duration.
  7. Click Save.
  8. Type your code in the provided editor.
  9. Click the Playground tab.
  10. Click Execute and Verify to validate your code.
  11. Change the Status to Active to run the job.
The job will start running in the background as per the configured frequency.

You can view the execution logs of Server Jobs running in the background. To view logs, click on the Logs button on the Server Jobs page. You can click on each log to see its full details.

Code Format

Use the following format while creating Server Job scripts:
 
async function main() {
    //Type your code here

}
 

To learn more about writing code for Server Scripts & jobs, click here. 

 Note:
  • Hourly background job should not take more than 90 sec for execution else it will be killed.
  • Other frequency jobs should not take more than 4 minutes for execution else they will be killed.
  • Background jobs cannot consume more than 128 MB of memory else it will be killed.
  • Background jobs have an execution limit per day as per your CRM edition. If there are more jobs to run, they will be executed next day
    • Growth Editions - 1 job per day
    • Professional Editions - 3 jobs per day
    • Enterprise Editions - 5 jobs per day 
Related articles
Server Scripts & Jobs Overview Using Custom Server Scripts in Processes, Workflows, and Approvals Writing Code for Server Scripts and Jobs Server Scripts Example - Update Credit Score of a Contact Server Scripts Example - Contact Email Validation and Data Enrichment
Home Privacy Policy Terms of Service Security Center Policy & Legal Center Contact Us
© Copyright 2025 Vtiger. All rights reserved.
Powered by Vtiger
Facebook Twitter Linkedin Youtube