Skip to content

Task Scheduling

Workflow tasks can be scheduled for automated execution at defined intervals. The scheduling configuration depends on the task type:

Start Point Tasks: If the task is a workflow starting point, Emakin periodically initiates new workflow instances based on the schedule and executes the evaluation script. The workflow proceeds to the next step after any action is taken.

Normal Tasks: For intermediate tasks, Emakin periodically checks for waiting tasks and executes the evaluation script. The workflow advances to the next step after any action.

Schedule Options

Enabled: Check to enable scheduled operation.

Schedule: Defines the scheduling rule (see Schedule Rules).

Script: The script executed when a scheduled event occurs.

Schedule Rules

Task scheduling uses repeating intervals and schedule rules. The interval defines the duration until the next scheduled execution (days, hours, or minutes). Schedule rules specify timeframes to exclude from the repetition. Without rules, the task repeats continuously (7x24). Rules can be Daily, Weekly, Yearly, or Annual, and chained together.

Common Schedule Examples

The following examples illustrate common schedules. Note that <Schedule Name=""> can be replaced with a descriptive name.

Daily Schedule (Runs daily at 4 PM)

Repeat Period: 10 Minutes

1
2
3
4
5
6
7
<Schedule Name="">
    <Rule Type="Daily">
        <Start>16:00:00</Start>
        <End>16:01:00</End>
        <Invert>True</Invert>  <!-- Inverts the rule; runs outside the specified time -->
    </Rule>
</Schedule>

Weekly Schedule (Runs every day except Sunday and Saturday)

Repeat Period: 1 Day

1
2
3
4
5
6
<Schedule Name="">
    <Rule Type="Weekly">
        <DayOfWeek>Sunday</DayOfWeek>
        <DayOfWeek>Saturday</DayOfWeek>
    </Rule>
</Schedule>

Weekly Schedule (Runs only on Mondays)

Repeat Period: 1 Day

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
<Schedule Name="Weekly Leave Request Report">
    <Rule Type="Weekly">
        <DayOfWeek>Sunday</DayOfWeek>
        <DayOfWeek>Tuesday</DayOfWeek>
        <DayOfWeek>Wednesday</DayOfWeek>
        <DayOfWeek>Thursday</DayOfWeek>
        <DayOfWeek>Friday</DayOfWeek>
        <DayOfWeek>Saturday</DayOfWeek>
    </Rule>
    <Rule Type="Daily">
        <Start>09:05:00</Start>
        <End>09:05:59</End>
        <Invert>True</Invert>  <!-- Inverts the rule; runs outside the specified time -->
    </Rule>
</Schedule>

Yearly Schedule (Runs on the 1st of every month)

Repeat Period: 1 Day

1
2
3
4
5
<Schedule Name="">
    <Rule Type="Yearly">
        <Day>1</Day>
    </Rule>
</Schedule>

Yearly Schedule (Runs on April 10th of every year)

Repeat Period: 1 Month

1
2
3
4
5
6
<Schedule Name="">
    <Rule Type="Yearly">
        <Day>10</Day>
        <Month>4</Month>
    </Rule>
</Schedule>

Annual Schedule (Runs every day except February 25th, 2000)

1
2
3
4
5
<Schedule Name="">
    <Rule Type="Annual">
        <Date>2000-02-25T00:00:00.0000000+00:00</Date>
    </Rule>
</Schedule>