I have used Windows Task Scheduler successfullly for more than 2 years to run AmiBroker batch files under Windows 10. (AmiBroker Version 6.20.1, Standard Edition-32 bit).
In the past few weeks, however, I have experienced intermittent failures which are reported by the Windows Task Scheduler as follows: Task Scheduler successfully completed task "\XXX" , instance "{QQQ}" , action "C:\Program Files (x86)\AmiBroker\Broker.exe" with return code 3221225794.
The arguments supplied to Broker.exe are: /runbatch "C:\Program Files (x86)\AmiBroker\Formulas\Systems\xxx\yyy\zzz.abb" /exit.
Can anyone shed light on return code 3221225794, and what I might do to avoid this error?
This error code is hexadecimally 0xC0000142 and it is "DLL Initialization Failed"
This means that one some DLLs that either AmiBroker or one of PLUGINS that you have installed cannot be initialized.
If AmIBroker can be run normally (by clicking its icon) and only get an error when running from scheduler, such error t might be because you are running AmiBroker from wrong folder. Current working directory for AmiBroker MUST BE SET properly, to the folder where AmIBroker is installed.
Thanks. I've defined the current working directory (Start In) as you described.
Results so far have been mixed: One successful overnight automated execution of the task, one overnight failure of automated execution, and one successful manual execution of the task.
Will continue to monitor and re-post if the problem recurs consistently.