VB.NET을 사용하여 예약 된 작업을 만드는 방법 - 단추 클릭시 vb.net 프로그램의 예약 된 작업 필드 채우기?VB.net을 사용하여 예약 된 작업 만들기
나는 현재로서는 아무 것도 없으며 가능한 경우에도 알지 못합니다.
VB.NET을 사용하여 예약 된 작업을 만드는 방법 - 단추 클릭시 vb.net 프로그램의 예약 된 작업 필드 채우기?VB.net을 사용하여 예약 된 작업 만들기
나는 현재로서는 아무 것도 없으며 가능한 경우에도 알지 못합니다.
네이티브 COM 인터페이스 주위에 래퍼를 만들어야합니다. 직접하고 싶지 않다면이 라이브러리를 사용할 수 있습니다. https://taskscheduler.codeplex.com
using System;
using Microsoft.Win32.TaskScheduler;
class Program
{
static void Main(string[] args)
{
// Get the service on the local machine
using (TaskService ts = new TaskService())
{
// Create a new task definition and assign properties
TaskDefinition td = ts.NewTask();
td.RegistrationInfo.Description = "Does something";
// Create a trigger that will fire the task at this time every other day
td.Triggers.Add(new DailyTrigger { DaysInterval = 2 });
// Create an action that will launch Notepad whenever the trigger fires
td.Actions.Add(new ExecAction("notepad.exe", "c:\\test.log", null));
// Register the task in the root folder
ts.RootFolder.RegisterTaskDefinition(@"Test", td);
// Remove the task we just created
ts.RootFolder.DeleteTask("Test");
}
}
}
고마워요. –