Ich mache es jetzt mit C #.
using (TaskService ts = new TaskService()) { // Create a new task definition and assign properties TaskDefinition td = ts.NewTask(); td.RegistrationInfo.Description = "Does something"; td.Principal.LogonType = TaskLogonType.InteractiveToken; // Run the service every hour. var tt = new TimeTrigger(); tt.Repetition.Interval = TimeSpan.FromDays(1); tt.StartBoundary = DateTime.Today; td.Triggers.Add(tt); // Add an action that will launch someProgram.exe whenever the trigger fires td.Actions.Add(new ExecAction("c:\example.exe", null, null)); // Register the task in the root folder const string taskName = "ExampleTask"; ts.RootFolder.RegisterTaskDefinition(taskName, td); // Remove the task we just created // ts.RootFolder.DeleteTask(taskName); }