---
sourceDocument: Australia ServiceNow AI Platform Capabilities
sourceDocumentLink: https://servicenow-prod.fluidtopics.net/r/de-DE/servicenow-platform

 Release :

    - australia

ft:locale :

    - de-DE

ft:publication_title :

    - Australia ServiceNow AI Platform Capabilities

ft:clusterId :

    - platcap

bundleId :

    - platcap

workflow :

    - Platform


---

# Timer workflow activity

# Timer workflow activity {#ariaid-title1}

* Freigeben Version: Australia
* 
* Aktualisiert 12. März 2026
* 
* ![](https://www.servicenow.com/docs/portal-asset/ico-clock) 5 Minuten Lesedauer

The Timer activity pauses the workflow for a specified period of time.{#r_Timer__wf-timer-activity-shortdesc}
This duration can be an absolute time value or a relative value based on a defined [Creating and using schedules](https://www.servicenow.com/docs/access?context=c_UseSchedules&version=australia&pubname=australia-platform-administration&ft:locale=en-US). It is best to adjust the Duration so the workflow can progress in a timely manner. To pause a workflow indefinitely until a condition is met, see [wait for
condition](https://servicenow-prod.fluidtopics.net/PH8PzpGBBmxQiSeZvnIG5A "The Wait for condition activity causes the workflow to wait at this activity until the current record matches the specified condition.").  
Hinweis:  
Timer activities run as the System user because the system scheduler advances the workflow.

## Results

{#r_Timer__table_b1r_fgd_lq__entry__2}

| Result | Description |
|-|-|
| Complete | The activity successfully reached the specified duration. |
| Cancelled | The activity or workflow was canceled before the timer reached the specified duration. |
[Tabelle : 1. Timer activity results]

{#r_Timer__table_b1r_fgd_lq}

## Input variables

Input variables determine the initial behavior of the activity.
{#r_Timer__table_dl4_ngd_lq__entry__2}

| Field | Description |
|-|-|
| Timer Information ||
| Timer based on | How the timer duration is computed. The options are: * A user specified duration: The duration is based on the Duration fields, such as days and hours. * A relative duration: The duration is based on the Relative duration (such as End of Next Business Day) and Wait fields. * A date/time or duration field: The duration is based on the Field value and the Wait field. * Script: The duration is based on a script that returns the number of seconds. {#r_Timer__ul_ebm_sgd_lq} |
| Duration Appears only when Timer based on is A user specified duration. | The specific number of days and hours to wait before proceeding to the next activity in the workflow. |
| Relative duration Appears only when Timer based on is A relative duration | The general number and length of business days to wait before progressing to the next workflow activity. . |
| Wait Appears only when Timer based on is A relative duration or A date/time or duration field. | An additional timer adjustment when Timer based on is A relative duration or A date/time or duration field. The options are: * The full duration: No modification of the calculated duration. * A % of the duration: The duration is adjusted by multiplying the number of seconds by the (Percentage / 100). * Some time before: The duration is shortened by the Time before days and hours. * Some time after: The duration is lengthened by the Time after days and hours. {#r_Timer__ul_q3v_chd_lq} |
| Percentage Appears only when Timer based on is A relative duration or A date/time or duration field. | The Wait percentage value when Timer based on is A relative duration or A date/time or duration field. |
| Time before Appears only when Timer based on is A relative duration or A date/time or duration field and Wait is Some time before. | The modifier time value when Wait is Some time before. |
| Time after Appears only when Timer based on is A relative duration or A date/time or duration field and Wait is Some time after. | The modifier time value when Wait is Some time after. |
| Field Appears only when Timer based on is A date/time or duration field. | The date/time or duration field that contains the elapsed wait-time before moving to the next workflow activity. |
| Script Appears only when Timer based on is Script | The script that sets 'answer' to the number of seconds for the duration. |
| Timer Schedule ||
| Schedule based on | The basic schedule the timer uses to count working hours. If a schedule is specified, the duration will only be considered for times that are specified on the schedule. For example, if the duration is 2 hours and the workflow begins at 4:00pm on a schedule that is 8am - 5pm, then it ends at 9:00am the next day. The options are: * This workflow's schedule: The schedule uses workflow context date, time, and an optional Time zone based on value. * A specific schedule: The schedule uses a pre-defined Schedule and an optional Time zone based on value. * A schedule field: The schedule uses a value from a table and an optional Time zone based on value. {#r_Timer__ul_wys_qhd_lq} |
| Schedule Appears only when Schedule based on is A specific schedule. | The pre-defined Schedule from a list. |
| Schedule field Appears only when Schedule based on is A schedule field. | A date and time or duration field for the schedule, that is associated with the table. Valid fields appear in blue on the Select the element from a tree dialog. |
| Timer Time Zone ||
| Time zone based on | The time zone for calculating the duration. The time zone may be based on: * No time zone: Default. Workflow uses the GMT time zone. * A specific time zone: A predefined Time zone. * A time zone field: A Time zone field to track time duration from a field on the form. {#r_Timer__ul_hmv_vhd_lq} |
| Time zone Appears only when Time zone based on is A specific time zone. | The predefined time zone. |
| Time zone field Appears only when Time zone based on is A time zone field. | A date and time or duration field for the schedule, that is associated with the table. Valid fields appear in blue on the Select the element from a tree dialog. |
[Tabelle : 2. Timer activity input variables]

{#r_Timer__table_dl4_ngd_lq}

## States

The activity state tells the workflow engine what to do with the activity.
{#r_Timer__table_qts_d3d_lq__entry__2}

| State | Description |
|-|-|
| Executing | The Timer activity is in this state very briefly while initializing, after which it immediately changes to Waiting. |
| Waiting | The workflow engine waits until the timer reaches the specified duration. The engine then transitions the workflow to the next activity. |
| Finished | The activity finished running. See the result value for the outcome of the activity. |
| Cancelled | This activity, or the workflow that contains this activity, was canceled. |
| Error | A JavaScript error occurred. Review the logs for error details. |
[Tabelle : 3. Timer activity states]

{#r_Timer__table_qts_d3d_lq}

## Example

You can use a Timer activity to pause the workflow until the end of
the business day.  
Abbildung : 1. Timer example

In this example, the script evaluates the time between the <var class="keyword varname">now</var> variable
and the <var class="keyword varname">eod</var> variable. The <var class="keyword varname">eod</var> variable is defined, in
24 hour time, as 4:00 PM. The script then sets the <var class="keyword varname">answer</var> variable to the
difference between these variables, in seconds, and logs a message.  

    // get now and calc end of day (4:00pm)
     
    var now =new Date();
     
    var eod =new Date();
    eod.setHours(16);
    eod.setMinutes(0);
    eod.setSeconds(0);
     
    answer =(eod.getTime()- now.getTime())/1000;
     
    workflow.debug('Timer will fire @: '+ eod +'  '+(answer/60)+' minutes from now');


