ZennoLab Assemblies Documentation
AddTask Method (ZennoPoster)
Example 
ZennoLab.CommandCenter Namespace > ZennoPoster Class : AddTask Method

Type: System.String

The new task to add in xml format.

Add a new task.
Syntax
public static void AddTask( 
   string task
)

Parameters

task

Type: System.String

The new task to add in xml format.

Example
The following example shows call the AddTask method.
// Create a task in xml format
var task =
@"<Id>{guid}</Id>
<Name>{name}</Name>
<CreateTime>{date DD.MM.YYYY hh:mm:ss}</CreateTime>
<ExecutionSettings>    
    <LimitOfThreads>1</LimitOfThreads>
    <MaxAllowOfThreads>0</MaxAllowOfThreads>
    <DoneSuccessfully>0</DoneSuccessfully>
    <DoneAll>0</DoneAll>
    <NumberOfTries>0</NumberOfTries>
    <LastNumberOfTries>0</LastNumberOfTries>
    <Priority>50</Priority>
    <Proxy>{DoNotUseProxy, IfPossible, UseProxyWithoutRemove, UseProxy}</Proxy>
    <Status>Newbie</Status>
    <ProxyLabels></ProxyLabels>
    <ShouldBeExecutedRandomly>{True, False}</ShouldBeExecutedRandomly>
    <GroupLabels>Без метки</GroupLabels>
    <GroupStates>Выполнены</GroupStates>
    <MaxNumOfSuccessStop>-1</MaxNumOfSuccessStop>
    <MaxNumOfFailStop>-1</MaxNumOfFailStop>
    <NumOfFailStop>0</NumOfFailStop>
</ExecutionSettings>
<Scheduler7Settings>
	<IsActive>{True, False}</IsActive>
	<ExecutePeriod>{OneTime, EveryDay, EveryWeek, EveryMonth, OnDemand}</ExecutePeriod> 
	
	<DaysOfWeek>{Monday,Tuesday,Wednesday,Thursday,Friday,Saturday,Sunday}</DaysOfWeek> 
	
	<DaysOfMonth>1-5,10,20</DaysOfMonth> 
	 
	<FileName>C:\Program Files\ZennoLab\signalFile.txt</FileName><IsNeedDeleteFile>{True, False}</IsNeedDeleteFile>
	<StartDateType>{Immediately, OnDate}</StartDateType> 
	
	<StartDate>{date DD.MM.YYYY hh:mm:ss}</StartDate> 
	<AttemptsRange>{5, 5 -10}</AttemptsRange> <IsClearSuccess>{True, False}</IsClearSuccess> 
	
	<Intervals>{09:00,12:00 - 17:00}</Intervals> 
	<RepeatType>{Continued, ContinuedWithPause, Regularly, Count}</RepeatType> 
	
	<RepeatCountDayRange>{1, 5 -10}</RepeatCountDayRange>
	<EndDateType>{Infinity, OnDate, Count}</EndDateType> 
	
	<RepeatCountTotalRange>{50, 75-100}</RepeatCountTotalRange> 
	 
	<EndDate>{date DD.MM.YYYY hh:mm:ss}</EndDate>
</Scheduler7Settings>
<Project>
    <ProjectFileLocation>{path}</ProjectFileLocation>
    <ProjectType>Assembly</ProjectType>
</Project>";
// Add the task
ZennoPoster.AddTask(task);
Requirements

Target Platforms: Desktop: Windows XP SP3 and older. Server: Windows Server 2003 and older.

See Also

Reference

ZennoPoster Class
ZennoPoster Members