Quantcast
Browsing all 2206 articles
Browse latest View live

New Post: How to auto-delete a task after running once?

TaskDefinition td = ts.NewTask();// Set the TimeSpan to a value that gives the action long enough to complete td.Settings.DeleteExpiredTaskAfter = TimeSpan.FromMinutes(1); td.Triggers.Add(new...

View Article


New Post: Configure for: Different Dropdowns

Great!  How would I implement that?  Is there an example somewhere I can look at?  Thanks!

View Article


New Post: Configure for: Different Dropdowns

You first set the desired Task.Defintion.Settings.Compatibility to the version you want to go to and then use the Task.Definition.Validate method to determine if the current settings will support that...

View Article

New Post: How to auto-delete a task after running once?

dahall wrote:TaskDefinition td = ts.NewTask();// Set the TimeSpan to a value that gives the action long enough to complete td.Settings.DeleteExpiredTaskAfter = TimeSpan.FromMinutes(1);...

View Article

New Post: How to determine if a task is OneTime task or not?

Which property or method of Task class identifies a OneTime task? 

View Article


New Post: How to auto-delete a task after running once?

My bad. DeleteExpiredTaskAfter requires the EndBoundary to be set. StartBoundary is set automatically in the TimeTrigger constructor to DateTime.Now.I don't know of anyway to delete the task...

View Article

New Post: How to determine if a task is OneTime task or not?

Add a single TimeTrigger to the task definition.

View Article

New Post: How to determine if a task is OneTime task or not?

Dahall,When i created a one time task with TimeTrigger and retrieved the information, the NextRun has 12/31/1899 12:00:00 AM. Can i check for presence of this value in the NextRun to identify a task as...

View Article


New Post: How to determine if a task is OneTime task or not?

That would be correct. The task has already exectuted unless you specified a StartBoundary in the future for the specific time you want it to run:new TimeTrigger(new DateTime(2012, 12, 31, 13, 0, 0,...

View Article


New Post: RegisterTaskDefinition failing with a...

Hi!I am getting an exception while creating a task using RegisterTaskDefinition. The stacktrace is as follows:FUNCTION: Void RegisterTaskDefinition(Scheduler.Schedule,...

View Article

New Post: RegisterTaskDefinition failing with a...

I would call the TaskService.GetFolder method and handle the FileNotFoundException as an indicator that the folder does not exist. I would then create it if necessary and handle those errors specifically.

View Article

New Post: Is possible to run existing task with argument?

I do the following calls:TaskService service = new TaskService();Task task = service.FindTask("TaskName");task.Run(new string[] { "c:\\data.xml" }); Task started but program didn't get any argument....

View Article

New Post: Is possible to run existing task with argument?

You must specify in the ExecAction that you are willing to take arguments. See http://msdn.microsoft.com/en-us/library/windows/desktop/aa383549(v=vs.85).aspx towards the bottom of the page under "Using...

View Article


New Post: Is possible to run existing task with argument?

Thanks dahall! Your solution works.

View Article

New Post: COMException: "(37,8):LogonType" when changing user

Hello, I am using v1.9.0.23355 of TaskScheduler and v1.9.0.23358 of TaskSchedulerEditor. I'm trying to use the TaskEditDialog to modify a task which I have created previously using the following...

View Article


New Post: COMException: "(37,8):LogonType" when changing user

Just a bit more information, after registering a task with the first snippet, if I look at the XML property for it I see the...

View Article

New Post: COMException: "(37,8):LogonType" when changing user

OK so I downloaded the source and put a break point in TaskFolder.cs (line 254); if (v2Folder != null)returnnew Task(this.TaskService, v2Folder.RegisterTaskDefinition(Path, definition.v2Def,...

View Article


New Post: AC Power Conditions

Is there any way to control the AC Power Condition?

View Article

New Post: COMException: "(37,8):LogonType" when changing user

The COMExeception you are seeing is coming from the fact that you must match the username and the TaskLogonType. If you are choosing SYSTEM or NETWORK SERVICE, you much choose...

View Article

New Post: AC Power Conditions

Look at the Task.Definition.Settings area and check out the properties StopIfGoingOnBatteries, DisallowStartIfOnBatteries and WakeToRun.

View Article
Browsing all 2206 articles
Browse latest View live