You can use Doug's
Task Scheduler class
>I'm using the following code to auto create tasks in the Windows Task Scheduler :
>
>loSched = CREATEOBJECT('Scheduler.SchAgent')
>WITH loSched
> .TaskName = "My task"
> .StartTime = DATETIME()
> .EXEName = "c:\capture.exe"
> .UserName = "XXXX"
> .Password = "xxxxxxxx"
> .ScheduleType = 1
> .Interval = 7
> llResult = .CreateTask()
>ENDWITH
>
>When executing this code the task is created BUT i cannot execute the task. The status is "Cannot be started".
>When i open the task and i (re)enter my password, the task works splendid. So it's a username/password-problem.
>
>Does anyone know what to do with this ?
--sb--