Bret,
The following works for me (VFP7, Win2K):
oSch=CreateObject("Scheduler.SchAgent")
oSch.refresh
osch.Job("Task1").Flags= 4
osch.Job("Task1").save
HTH
>>Bret,
>>
>>Check out the following link:
>>
>>
http://home.sprintmail.com/~mpryor/c-frame.htm?tskfaq.htm>>
>>HTH
>>>I was wondering if anyone knew how to enable or disable a scheduled task in the MS Task Scheduler from within VFP.
>>>
>>>I am downloading data from another base and wish to enable a task if the data was downloaded OK. If there was download problems I wish to disable the task.
>>>
>>>TIA
>
>
>I looked at the web site, but the VB code oSch = CreateObject("Scheduler.SchAgent"), does not work on my system in VFP. I would think the Object would be the same.
>
>Does anyone know what the object name is to enter into the CreateObject command.
Daniel