Table of Contents

Delay execution by x seconds

This script can be run to add a delay between job steps, response actions, etc.

To use it between job steps, insert a new step configured to run a script, and use this code as the script body.

Adjust the sleepTimeInSeconds value as appropriate to get the desired delay.

using System;
using System.Collections.Generic;
using ArcanaDevelopment.adTempus.ApplicationIntegration;
using ArcanaDevelopment.adTempus.Shared;


namespace UserScript
{
    public class UserScript : ArcanaDevelopment.adTempus.ApplicationIntegration.UserScriptBase
    {
        public override Object Run()
        {
        // pause execution for the specified number of seconds
        var sleepTimeInSeconds = 30;
        adTempus.LogMessage(MessageTypeEnum.Informational, 0, string.Format("Delaying execution for {0} seconds", sleepTimeInSeconds));			
        adTempus.Sleep(sleepTimeInSeconds * 1000);            
            return 0;
        }
    }
}