Scheduler Creation in Sailpoint

Need to create a schedular to schedule job is running 4 times a day (1AM/7AM/1PM/7PM CST) → This job will find all the delta (within 6hrs window) user’s list who got assigned below entitlements(ENT_LIST) and whose effective start date prior to yesterday. Can someone guide me with this and if any sample code is there please share. As I’m new to sailpoint iiq development. version is 8.2.

Hi Likith,

Welcome to the SailPoint Community!

To create a scheduled task in SailPoint, follow these steps:

  1. Navigate to the Task Definition:
  • Open the SailPoint IdentityNow or IdentityIQ console.
  • Go to Setup > Tasks > Task Definitions.
  1. Create a New Task:
  • Click on the Create New Task button.
  • Enter a name and description for the task to identify its purpose.
  1. Configure the Task:
  • Select the appropriate options
  1. Schedule the Task:
  • To schedule the task, go to the Schedule section within the task configuration.
  • Set the frequency and timing for the task execution. SailPoint supports various scheduling options like daily, weekly, monthly, etc.
  1. Using Cron Expressions:
  • For advanced scheduling, you can use cron expressions. Cron expressions provide precise control over the task scheduling.
  • To generate a cron expression, you can use an online tool like Dev Tool Cafe’s Cron Generator. This tool helps you create a cron expression based on your specific needs. In this example every 4 hours
  1. Save and Test the Task:
  • After configuring the task and schedule, save the task definition.
  • It’s a good practice to run the task manually at least once to ensure it works as expected before relying on the schedule.
1 Like

Hi @likith2501 ,

I recommend creating and scheduling a Run Rule task for this so that you can execute it at your desired times.

You could start by getting a list of the users that have the entitlements assigned and then filter them out based on the 6hrs. Something like this below:

  import java.util.List;
  import java.util.Map;
  import java.util.Iterator;
  import sailpoint.object.Filter;
  import sailpoint.object.Identity;
  import sailpoint.object.AttributeAssignment;  

Application applicationConfig = context.getObjectByName(Application.class, "Your Application Name"); // The application where the entitlement was aggregated from.

IdentityService identityService = new IdentityService(context); // Create new Identity Service

queryOptions.addFilter(Filter.eq("application", applicationConfig)); // Add filter so you can return users that are in the application

Iterator result = context.getObjects(Link.class, queryOptions).iterator(); // Get the identities associated to the application

  while(result.hasNext()) 
  {
    Link identity = (Link) result.next();

    if(identity.getIdentity() != null) 
    {
     List identityLinks = identityService.getLinks(identity.getIdentity(), applicationConfig); // Get the Identity Links
      if(null != identityLinks && !identityLinks.isEmpty())
      {
        for(Link item : identityLinks)
        {
          if(item.getApplicationName().equals(applicationConfig.getName()))
          {
               link.getCreated(); // This will allow you to get the created date when the access was assigned
          }
        }
      }
    }
  }

The code above is not 100% what you need but could be a good starting point to assist you.

I hope this helps.

1 Like

Hi Likith,

To schedule a task on customize time, create taskSchedule object from debug and mention the below cron expression.

0 1,7,13,18 * * *

2 Likes

@likith2501
Are you looking for a code help or how to schedule assuming you already have the code for use case, can you be more specific please

if its related to schedule others already commented, but I believe you are looking for a code help, if so can you please provide a detailed use case

Yes, I am looking for the code. so, we have scenario like customer have few entitlements for the users where SailPoint has the entitlements already only users will be added to it. they request from AD Active directory and sync to SailPoint. so, we need to get the report of those users who got sync or got this entitlements within the 6 hours. and send the report to there server location. We need this to be refreshed and send the report everyday once.

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.