X

The Integration blog covers the latest in product updates, best practices, customer stories, and more.

Defining OIC Schedules

Sumeet Singh
Principal Member of Technical Staff

Synopsis:

This blog describes how to define OIC Schedules with various frequencies via UI and REST APIs.

Frequencies:

  1. Only Once
  2. Hours and Minutes
  3. Days
  4. Weeks
  5. Months
  6. Day of every Week & Week of every Month
  7. Day of every Month
  8. Months of every Year
  9. iCal Expressions

 

REST API to create or update schedule

REST API endpoint: ic/api/integration/v1/integrations/{id}/schedule

POST - Use HTTP verb POST to create a schedule.

PUT - Use HTTP verb PUT to update a schedule.

Sample JSON Request Payload to create/update schedule:

{ "frequency": { "frequencyType": "ONCE" }, "name": "SCH_ONE_01_00_0000", "description": "Description for schedule" ,"scheduleTZ": "Asia/Calcutta" "startDate": "1/20/2021|13:12:00", "endDate": "1/30/2021|13:12:00"} 

Each frequency has to be defined as a payload.

 

Only Once:

If you want to schedule an integration only once on a particular date then apply this frequency. In UI, it's a default selected frequency if you are creating a new schedule definition.

Set this frequency via UI:

Only Once

Set this frequency via REST API using JSON Request Payload:

{ "frequency": { "frequencyType": "ONCE" }, "name": "SCH_ONE_01_00_0000", "scheduleTZ": "Asia/Calcutta" "startDate": "1/20/2021|13:12:00" } 

 

 

Hours and Minutes:

If you want to schedule an integration to run on hourly and minutely basis, starting from given start date till end date, then apply this frequency.

NOTE: End Date / Until Date is optional. If you don't give any value then it will repeat indefinitely.

Set this frequency via UI:

HOurs and Minutes

Set this frequency via REST API using JSON Request Payload : Hours and Minutes (Everyday 01 hour and 05 Minutes))

{ "frequency": { "frequencyType": "MINUTELY", "interval": 65 }, "name": "Schedule SCH_ONE_01_00_0000" "scheduleTZ": "Asia/Calcutta" "startDate": "1/20/2021|13:12:00", "endDate": "1/30/2021|13:12:00" }

 

Days:

If you want to schedule an integration to run on the basis of "number of days", starting from given start date till end date, then apply this frequency.

e.g integration should run every 10th Day

NOTE: End Date / Until Date is optional. If you don't give any value then it will repeat indefinitely.

Set this frequency via UI:

days

Set this frequency via REST API using JSON Request Payload: Day (Every 10th Day)

{ "frequency": { "frequencyType": "DAILY", "interval": 10 }, "name": "Run SCH_ONE_01_00_0000", "startDate": "1/22/2021|10:00:00", "endDate": "1/29/2021|13:12:00", "scheduleTZ": "Asia/Calcutta" }

 

Weeks:

If you want to schedule an integration to run on a weekly basis, starting from given start date till end date, then apply this frequency.

e.g integration should run every 3rd Week

NOTE: End Date / Until Date is optional. If you don't give any value then it will repeat indefinitely.

Set this frequency via UI:

weeks

Set this frequency via REST API using JSON Request Payload: Weeks (Every 3rd Week)

{ "frequency": { "frequencyType": "WEEKLY", "interval": 3 }, "name": "Run SCH_ONE_01_00_0000", "startDate": "1/22/2021|10:00:00", "endDate": "1/29/2021|13:12:00", "scheduleTZ": "Asia/Calcutta" }

 

Months:

If you want to schedule an integration to run on monthly basis, starting from given start date till end date, then apply this frequency.

e.g integration should run every 5 Months.

NOTE: End Date / Until Date is optional. If you don't give any value then it will repeat indefinitely.

Set this frequency via UI:

months

Set this frequency via REST API using JSON Request Payload: Months (Every 5th Month)

{ "frequency": { "frequencyType": "MONTHLY", "interval": 5 }, "name": "Run SCH_ONE_01_00_0000", "startDate": "1/22/2020|10:00:00", "endDate": "12/29/2022|13:12:00", "scheduleTZ": "Asia/Calcutta" }

 

Day of every week & Week of every Month:

If you want to schedule an integration to run on specific day(s) of specific week(s) in a month, starting from given start date till end date, then apply this frequency.

e.g integration should run every weekday of 2nd and 4th Week of the month.

NOTE: End Date / Until Date is optional. If you don't give any value then it will repeat indefinitely.

Set this frequency via UI:

Step 1: Choose Frequency Days and then click on Day(s). Select "Day of every week" from the menu.

day of every week

Step 2: Select required Days in a week, or you can also click on weekday or weekend so that it will automatically select corresponding days.

day of every week 2

Step 3: Now choose another frequency: Weeks, and then click on Week(s) and select "Week of every month" menu.

week of every month

Step 4: Now select the required weeks of the month.

Set this frequency via REST API using JSON Request Payload: Day of every week & Week of every month (Eevery weekday of a week and every 2nd and 4th week of the month)

{ "frequency": { "daysOfWeek": [ "MONDAY", "TUESDAY", "WEDNESDAY", "THURSDAY", "FRIDAY" ], "frequencyType": "MONTHLY", "weeksOfMonth": [ "FOURTH", "SECOND" ] }, "name": "Run SCH_ONE_01_00_0000", "startDate": "1/22/2020|10:00:00", "endDate": "12/29/2022|13:12:00", "scheduleTZ": "Asia/Calcutta" }

 

Day of every month:

If you want to schedule an integration to run on specific day(s) of a month, starting from given start date till end date, then apply this frequency.

e.g integration should run every 8th, 16th, and 23rd day of every month.

NOTE: End Date / Until Date is optional. If you don't give any value then it will repeat indefinitely.

Set this frequency via UI:

Step 1: Choose Days frequency. Click on Day(s) and then click on "Day of every month" menu.

Step 2: Now Select required days for every month

Set this frequency via REST API using JSON Request Payload: 8th, 16th and 23rd day of every month

{ "frequency": { "daysOfMonth": [ 8, 16, 23 ], "frequencyType": "MONTHLY" }, "name": "Run SCH_ONE_01_00_0000", "startDate": "1/22/2020|10:00:00", "endDate": "12/29/2022|13:12:00", "scheduleTZ": "Asia/Calcutta" }

 

Months of every year:

If you want to schedule an integration to run on specific month(s) of a year, starting from given start date till end date, then apply this frequency.

e.g integration should run on February, June and October of every year.

NOTE: End Date / Until Date is optional. If you don't give any value then it will repeat indefinitely.

Set this frequency via UI:

Step 1: Choose frequency Months. Click on Month(s) and then select "Months of every year" menu.

Step 2: Select the required months.

When "Months of every year" is selected, either "Day of every month" or ("Day of every week" and "Week of every month") must be selected.

Set this frequency via REST API using JSON Request Payload: Months of every year & Day of every month(On 18th, 25th, and 11th day of June, October and February months)

{ "frequency": { "daysOfMonth": [ 18, 25, 11 ], "frequencyType": "YEARLY", "monthsOfYear": [ "JUNE", "OCTOBER", "FEBRUARY" ] }, "name": "Run SCH_ONE_01_00_0000", "startDate": "1/22/2020|10:00:00", "endDate": "12/29/2022|13:12:00", "scheduleTZ": "Asia/Calcutta" }

 

Set this frequency via REST API using JSON Request Payload: Months of every year & (Day of every week & Week of every month) (On Saturday, Sunday of every 2nd and 4th Week of February, June and October Months every year)

{ "frequency":{ "frequencyType":"YEARLY", "daysOfWeek":[ "SATURDAY", "SUNDAY" ], "monthsOfYear":[ "FEBRUARY", "JUNE", "OCTOBER" ], "weeksOfMonth":[ "SECOND", "FOURTH" ] }, "name": "Run SCH_ONE_01_00_0000", "startDate": "1/22/2020|10:00:00", "endDate": "12/29/2022|13:12:00", "scheduleTZ": "Asia/Calcutta" }

 

iCal Expressions:

If you want to schedule an integration by providing iCal Expressions (Which has more flexibility of setting various frequencies), starting from given start date till end date, then apply this frequency.

OIC supports iCalendar (RFC 2445) specification but COUNT, UNTIL, BYSETPOS, WKST are not supported.

NOTE: End Date / Until Date is optional. If you don't give any value then it will repeat indefinitely.

Set this frequency via UI:

Set this frequency via REST API using JSON Request Payload:

{ "icalExpression": "FREQ=MINUTELY;INTERVAL=1;", "name": "Run SCH_ONE_01_00_0000", "startDate": "1/22/2020|10:00:00", "endDate": "12/29/2022|13:12:00", "scheduleTZ": "Asia/Calcutta" }

 

Combining multiple iCal expressions (Combining more than one frequency):

  1. Every year on the first and last Tuesday of January and February
  2. Every Wednesday at 09:00 AM

Set this frequency via REST API using JSON Request Payload:

{ "icalExpression": "FREQ=YEARLY;INTERVAL=1;BYMONTH=1,2;BYDAY=1TU,-1TU;&freq=weekly;byday=wed;byhour=9;", "name": "Run SCH_ONE_01_00_0000", "startDate": "1/22/2020|10:00:00", "endDate": "12/29/2022|13:12:00", "scheduleTZ": "Asia/Calcutta" }

 

Update Timezones:

You can update timezones using PUT Schedule API with following JSON request payload:

You need to provide the name and the same frequency if you only need to update timezone using below payload

{ "frequency": { "daysOfMonth": [ 8, 16, 23 ], "frequencyType": "MONTHLY" }, "name": "Run SCH_ONE_01_00_0000", "startDate": "1/22/2020|10:00:00", "endDate": "12/29/2022|13:12:00", "scheduleTZ": "Asia/Calcutta" }

Join the discussion

Comments ( 1 )
  • Deb Mukherjee Monday, April 5, 2021
    Hi Sumeet,

    Great article.
    Suppose I need to see all my schedules for a month for all the scheduled integrations.
    Is there a screen available, where I can see this?

    Regards,
    Deb
Please enter your name.Please provide a valid email address.Please enter a comment.CAPTCHA challenge response provided was incorrect. Please try again.