Search Results for

    Show / Hide Table of Contents

    Interface IServerTask

    The system entity for a server task, which can be offloaded and run on the task services rather than locally

    See https://help.lemonedge.com/help/open-architecture/status/server-tasks/intro.html for more information

    Inherited Members
    ICanBeLocked.Locked
    IQueueableItemOnSave.QueueItem(String, DateTimeOffset, IStorageManager)
    IBaseEntity.AccountID
    IBaseEntity.ID
    IBaseEntity.LastUpdated
    IBaseEntity.ModifiedByUserID
    IBaseEntity.CanvasID
    IBaseEntity.GetLabel(String)
    IBaseEntity.SetLabel(String, String)
    IBaseEntity.SetSilentLabel(String, String)
    System.IEquatable<LemonEdge.API.Core.IBaseEntity>.Equals(LemonEdge.API.Core.IBaseEntity)
    System.ComponentModel.INotifyPropertyChanged.PropertyChanged
    System.ComponentModel.INotifyPropertyChanging.PropertyChanging
    ICloneableAsync.Clone(Object)
    ICloneableAsync.CopyFromSource(Object)
    ICanTrackProperties.HasTrackedPropertyChanged(String)
    ICanTrackProperties.OriginalTrackedPropertyValue(String)
    ICanTrackProperties.OriginalTrackedPropertyValue<T>(String)
    ICanTrackProperties.ClearTrackedOriginalValues()
    ICanTrackProperties.GetAllOriginalTrackedPropertyValues()
    ISetCopier.GetCopyInfo(IEntityUpdater)
    Namespace: LemonEdge.API.Entities
    Assembly: API.dll
    Syntax
    [EntityDefinition(EntityID.ServerTask, "dbo.LT_ServerTasks", "ServerTask", LabelColumn = "Description", SelectWithNoLock = true, HelpURL = "help/open-architecture/status/server-tasks/intro.html")]
    [DefaultEntityIcon(ImageType.ServerProcess)]
    public interface IServerTask : IBaseEntityWithPermissions, ICanBeLocked, IQueueableItemOnSave, IBaseEntity, IEquatable<IBaseEntity>, INotifyPropertyChanged, INotifyPropertyChanging, ICloneableAsync, ICanTrackProperties, ISetCopier

    Properties

    Cancel

    Indicates the user has cancelled the execution of this task.

    Declaration
    [EntityProperty(SQLType.Bit, false)]
    [EntityDescription("Indicates the user has cancelled the execution of this task.")]
    bool Cancel { get; set; }
    Property Value
    Type Description
    System.Boolean

    Description

    A user friendly description of the task to be processed

    Declaration
    [EntityProperty(SQLType.NVarChar, (short)2000, true)]
    [EntityDescription("A user friendly description of this server task.")]
    string Description { get; set; }
    Property Value
    Type Description
    System.String

    Enabled

    Indicates if this task is enabled - only enabled tasks will be processed by the task services

    Declaration
    [EntityProperty(SQLType.Bit, false, "0")]
    [EntityDescription("Indicates if the task is disabled or should not.")]
    [HardCodedDefaultValueOnNew("0")]
    bool Enabled { get; set; }
    Property Value
    Type Description
    System.Boolean

    EndedRunDate

    Holds the data and time the task services finished processing this task.

    Declaration
    [EntityProperty(SQLType.DateTimeOffset, true)]
    [EntityDescription("The date/time this task ended (failure or completion) being processed.")]
    DateTimeOffset? EndedRunDate { get; set; }
    Property Value
    Type Description
    System.Nullable<System.DateTimeOffset>

    EndRunDate

    If this task has an Occurrence and Frequency (i.e. is set to repeat) then this date indicates the date the repeating task should stop.

    This doesn't have to be set - if it is blank, a task will repeat forever.

    Declaration
    [EntityProperty(SQLType.DateTimeOffset, true)]
    [EntityDescription("If this task has an occurance, this indicates what date the task should stop recreating itself after.")]
    DateTimeOffset? EndRunDate { get; set; }
    Property Value
    Type Description
    System.Nullable<System.DateTimeOffset>

    Frequency

    Used in conjunction with Occurrence to specify how often the task should repeat.

    i.e.with an Occurrence of Days and a Frequency of 1, the task would repeat every day.With an Occurrence of Months and a Frequency of 3, it would repeat every 3 months (or quarter).

    Declaration
    [EntityProperty(SQLType.SmallInt, false)]
    [EntityDescription("If this task has an Occurance, this Frequency indicates how many dayes/weeks/months/etc after the task was run that it should be recreated to run again for.")]
    short Frequency { get; set; }
    Property Value
    Type Description
    System.Int16

    HasResult

    Returns true if this task has a result record in IServerTaskData

    Declaration
    [EntityProperty(SQLType.Bit, false, "0")]
    [EntityDescription("Returns true if this task has a result record in an IServerTaskData record.")]
    bool HasResult { get; set; }
    Property Value
    Type Description
    System.Boolean

    NextRunDate

    If this is a scheduled task to run at some point in the future, this will hold the date/time the task should next run.

    If this is blank then the task should be processed at the earliest possible convinience

    Declaration
    [EntityProperty(SQLType.DateTimeOffset, true)]
    [EntityDescription("The date time to next run this task. If null then is to be run immediately.")]
    DateTimeOffset? NextRunDate { get; set; }
    Property Value
    Type Description
    System.Nullable<System.DateTimeOffset>

    Occurance

    If this task is to repeat then you can use this to specify how often you want it to repeat [Days, Weeks, Months, Years]

    Declaration
    [EntityProperty(SQLType.SmallInt, true)]
    [EntityDescription("Indicates if this task should be recreated again after it has completed running. If so, what period is used to provide a date for the new instance of the task.")]
    ServerTaskOccurance? Occurance { get; set; }
    Property Value
    Type Description
    System.Nullable<ServerTaskOccurance>

    StartedRunDate

    Holds the date and time the task was picked up by a task service and started processing.

    Declaration
    [EntityProperty(SQLType.DateTimeOffset, true)]
    [EntityDescription("The date/time this task started being processed.")]
    DateTimeOffset? StartedRunDate { get; set; }
    Property Value
    Type Description
    System.Nullable<System.DateTimeOffset>

    Status

    The status of the task

    Declaration
    [EntityProperty(SQLType.SmallInt, false)]
    [EntityDescription("Current status of server task.")]
    ServerTaskStatus Status { get; set; }
    Property Value
    Type Description
    ServerTaskStatus

    TaskType

    The type of task being processed. Custom tasks coded against our API (inheriting from ITaskProcessor) will also appear here.

    Declaration
    [EntityProperty(SQLType.UniqueIdentifier, false)]
    [EntityDescription("The typeof task to run on the server.")]
    Guid TaskType { get; set; }
    Property Value
    Type Description
    System.Guid

    TotalRunTime

    Holds the total amount of time spent processing the task (End Run Date - Started Run Date).

    Is a calculated property, is not stored in the database

    Declaration
    string TotalRunTime { get; }
    Property Value
    Type Description
    System.String

    Extension Methods

    MiscExtensions.SetIfNotEqual<T, P>(T, Expression<Func<T, P>>, P)
    ReflectionExtensions.ClearEventInvocations(Object, String)
    StringExtensions.ToCSVFormatString(Object, Type)
    SQLExtensions.ToSQLValue(Object, Boolean)
    In This Article
    Back to top © LemonEdge Technology. All rights reserved.