<back to all web services

GetScheduledTasks

The following routes are available for this service:
GET/RestApi/sitefinity/scheduling/scheduled-tasks

export enum OrderByType
{
    ScheduledFor = 'ScheduledFor',
    LastExecutionDate = 'LastExecutionDate',
    Status = 'Status',
    NameAsc = 'NameAsc',
    NameDesc = 'NameDesc',
}

export enum FilterByType
{
    All = 'All',
    Pending = 'Pending',
    Started = 'Started',
    Stopped = 'Stopped',
    Failed = 'Failed',
    Recurring = 'Recurring',
}

export class GetScheduledTasks
{
    public Skip: number;
    public Take: number;
    public SearchTerm: string;
    public OrderBy: OrderByType;
    public FilterBy: FilterByType;

    public constructor(init?: Partial<GetScheduledTasks>) { (Object as any).assign(this, init); }
}

export class ScheduledTaskViewModel
{
    public TaskId: string;
    public Name: string;
    public Title: string;
    public Status: string;
    public ErrorMessage: string;
    public RecurringInterval: string;
    public ScheduledForDate: string;
    public LastExecutionTime?: string;
    public Hash: string;

    public constructor(init?: Partial<ScheduledTaskViewModel>) { (Object as any).assign(this, init); }
}

export class GetScheduledTasksResponse
{
    public Items: ScheduledTaskViewModel[];
    public TotalCount: number;

    public constructor(init?: Partial<GetScheduledTasksResponse>) { (Object as any).assign(this, init); }
}

TypeScript GetScheduledTasks DTOs

To override the Content-type in your clients, use the HTTP Accept Header, append the .csv suffix or ?format=csv

HTTP + CSV

The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.

GET /RestApi/sitefinity/scheduling/scheduled-tasks HTTP/1.1 
Host: www.asg.com.au 
Accept: text/csv
HTTP/1.1 200 OK
Content-Type: text/csv
Content-Length: length

{"TotalCount":0}