Defining a Recurring Scheduled Script Deployment

Scripts are scheduled in SuiteCloud Development Framework (SDF) using recurrence fields on the scriptdeployment field in the scheduledscript object.

Additional information about scheduled script deployment can be found in Scheduled Script Submission.

SDF includes the following validations for recurrence fields:

The following table contains descriptions for the recurrence fields. For a list of possible values, see the reference documentation for recurrence in the scheduledscript element in SuiteCloud Development Framework XML Reference.

Recurrence Fields

Description

daily

Schedules the script to deploy every x number of days, with a start date and end date. The event can repeat.

everyweekday

Schedules the script to deploy every week day, with a start date and end date. The event can repeat.

monthly

Schedules the script to deploy every x number of months, with a start date and end date. The event can repeat.

monthlydayofweek

Schedules the script to deploy on a day of the week every x number of months, with a start date and end date.

The day of the week can be specified based on its placement. For example, first, second, third, fourth, or last.

The event can repeat.

single

Schedules the script to deploy as a single event with a start date and start time. The event can repeat.

weekly

Schedules the script to deploy every x number of weeks, with a start date and end date. Specific days of the week are Boolean fields. The event can repeat.

yearly

Schedules the script to deploy every year with a start date and end date. The event can repeat.

yearlydayofweek

Schedules the script to deploy every year based on a day of the week, with a start date and end date.

The day of the week can be specified based on its placement. For example, first, second, third, fourth, or last.

The event can repeat.

Recurrence Examples

The following table contains examples of fields used for recurring schedule events.

Recurrence Field

Example

Description

daily

                      <recurrence>
    <daily>
        <everyxdays>3</everyxdays>
        <startdate>2020-08-27</startdate>
        <starttime>00:00:05Z</starttime>
        <repeat>PT12H</repeat>
        <enddate>2021-08-27Z</enddate>
    </daily>
</recurrence> 

                    

Schedules the script to deploy every 3 days, starting August 27, 2020 at 12:00 a.m Eastern Standard Time (North America). The script deployment repeats after 12 hours. The recurrence ends August 27, 2021.

everyweekday

                      <recurrence>
    <everyweekday>
        <startdate>2020-09-27</startdate>
        <starttime>00:00:00Z</starttime>
        <repeat>PT15M</repeat>
        <enddate>2021-10-24Z</enddate>
    </everyweekday>
</recurrence> 

                    

Schedules the script to deploy every weekday, starting September 27, 2020 at 12:00 a.m. The script deployment repeats after 15 minutes. The recurrence ends October 24, 2021.

monthly

                      <recurrence>
    <monthly>
        <everyxmonths>1</everyxmonths>
        <startdate>2020-12-21</startdate>
        <starttime>00:00:00Z</starttime>
        <repeat>PT30M</repeat>
        <enddate>2021-06-21Z</enddate>
    </monthly>
</recurrence> 

                    

Schedules the script to deploy every month, starting December 21, 2020 at 12:00 a.m. The script deployment repeats after 30 minutes. The recurrence ends June 21, 2021.

monthlydayofweek

                      <recurrence>
    <monthlydayofweek>
        <orderofweek>LAST</orderofweek>
        <dayofweek>FRIDAY</dayofweek>
        <everyxmonths>2</everyxmonths>
        <startdate>2020-09-15</startdate>
        <starttime>00:00:00Z</starttime>
        <repeat>PT8H</repeat>
        <enddate>2021-08-16Z</enddate>
    </monthlydayofweek>
</recurrence> 

                    

Schedules the script to deploy the last Friday of every second month. The start date is September 15, 2020 at 12:00 a.m. The script deployment repeats after 8 hours. The recurrence ends August 16, 2021.

single

                      <recurrence>
    <single>
        <startdate>2020-08-27</startdate>
        <starttime>00:00:00Z</starttime>
        <repeat>PT2H</repeat>
    </single>
</recurrence> 

                    

Schedules the script to deploy on July 27, 2020 at 12:00 a.m. The script deployment repeats after 2 hours.

weekly

                      <recurrence>
    <weekly>
        <everyxweeks>1</everyxweeks>
        <monday>F</monday>
        <tuesday>T</tuesday>
        <wednesday>F</wednesday>
        <thursday>T</thursday>
        <friday>T</friday>
        <saturday>F</saturday>
        <sunday>T</sunday>
        <startdate>2020-11-27</startdate>
        <starttime>00:00:00Z</starttime>
        <repeat>PT1H</repeat>
        <enddate>2021-10-27Z</enddate>
    </weekly>
</recurrence> 

                    

Schedules the script to deploy every week on Tuesday, Thursday, Friday, and Sunday. The start date is November 27, 2020 at 12:00 a.m. The script deployment repeats after 1 hour. The recurrence ends October 27, 2021.

yearly

                      <recurrence>
    <yearly>
        <startdate>2020-06-18</startdate>
        <starttime>00:00:00Z</starttime>
        <repeat>PT30M</repeat>
        <enddate>2025-06-18Z</enddate>
    </yearly>
</recurrence> 

                    

Schedules the script to deploy every year starting June 18, 2020 at 12:00 a.m. The script deployment repeats after 30 minutes. The recurrence ends June 18, 2025.

yearlydayofweek

                      <recurrence>
    <yearlydayofweek>
        <orderofweek>THIRD</orderofweek>
        <dayofweek>MONDAY</dayofweek>
        <startdate>2020-07-25</startdate>
        <starttime>00:00:00Z</starttime>
        <repeat>PT12H</repeat>
        <enddate>2021-08-27Z</enddate>
    </yearlydayofweek>
</recurrence> 

                    

Schedules the script to deploy the Monday of every third week, starting July 25, 2020 at 12:00 a.m. The script deployment repeats after 12 hours. The recurrence ends August 27, 2021.

Related Topics

Scheduled Scripts as XML Definitions
Scheduled Script Example

General Notices