Yes I have done that and the local time on the screen is correct but the task time is incorrect.
>>Below is the code used to write comments to the log file. The DateTime() function is 3 hours different from the local time when run as a scheduled task. If I run this code on the server from the VFP command Window the time is correct. The same is true if I use the WINAAPI GetLocalTime(). The application does not read any config file. GetStartIn() is a function that returns the directory where the application started and where the log file is located.
>>
>>
>> Procedure WriteToLog
>> LParameter tcText
>> =StrToFile(Ttoc(DateTime(),3)+" "+tcText+DC_CRLF,GetStartIn()+"dCFusionTasks.log",1)
>> Return
>> EndProc
>>
>
>Try to log in as the account used for the scheduled task and run it manually, or to create a copy of the task to run under your account and run it as scheduled. See if that changes anything when you run it that way. Scheduled tasks run in their own environment, defined by the account - they use the account's folders, private settings, rights etc etc.
Simon White
dCipher Computing