dahall / TaskScheduler

Provides a .NET wrapper for the Windows Task Scheduler. It aggregates the multiple versions, provides an editor and allows for localization.
MIT License
1.2k stars 191 forks source link

Create a new folder and a task within using Fluent syntax #900

Closed dahall closed 2 years ago

dahall commented 2 years ago

Discussed in https://github.com/dahall/TaskScheduler/discussions/899

I was wondering if someone can show me an example of how to create a new folder and then save a new task within using the Fluent syntax?

dahall commented 2 years ago

This can already be done using the Fluent syntax by merely prefacing the task name with the name of the folder as follows:

TaskService.Instance.Execute("notepad.exe").OnIdle().AsTask("ChildOfRoot\\NextChild\\Test");