Languages: C#, VB.NET

View on GitHub to download or comment.

See the User script help topic for additional information.

Samples index

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.

sample.cs
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;
        }
    }
}
sample.vb
Imports System
Imports System.Collections.Generic
Imports ArcanaDevelopment.adTempus.Shared
Imports ArcanaDevelopment.adTempus.ApplicationIntegration

Public Class UserScript
    Inherits ArcanaDevelopment.adTempus.ApplicationIntegration.UserScriptBase

    Public Overrides Function Run() As Object

        'pause execution for the specified number of seconds
	Dim sleepTimeInSeconds = 30
        adTempus.LogMessage(MessageTypeEnum.Informational, 0, string.Format("Delaying execution for {0} seconds", sleepTimeInSeconds))
	adTempus.Sleep(sleepTimeInSeconds * 1000)
        Return 0
    End Function
End Class

Comments

View on GitHub to comment.