Hi QS team,
I want to run downloader few times a day.
the script for the task manager starts it O.K.
However, when downloader finishes download it stays open & next run is blocked.
App.Main.Quit() is not available to be used in downloader prescript.
Is there any other function that can be used in downloader to close/exit it once it completes the run?
Here is my script that is used to start downloader by QS Task mgr.
var SleepInterval : int = 60000; //in milisec
var NoOfScans : int = 5; // to cover 9.30 -16.00 = 390min
for (var i : int = 1; i < NoOfScans; i++ )
{
Downloader.StartDownloader("fDaily");
App.Main.Sleep(SleepInterval);
}
First loop goes fine, but Download Manager window is popped up, opens "fDaily" status window and waits for user to close.
after 1min sleep FOR loop is attemptingg to run "fDaily" again but notification pops out:
" You have to check at lease one raw"
and wailts for manual input in Downloader Manager "fDaily" status window.
If I do not check one item or close the previous run status window it will not execute subsequent runs.
I tried it. I was working but still opening Downloader Mgr & prompting for input.
When I changed 3rd parameter to 'false' - Downloader.DownloadData("", "fDaily", false, null, null);
and restared QS main it is working fine & not prompting for input.
Yes, after the restart of the QS main it works quitely when using:
Downloader.DownloadData("", "fDaily", false, null, null);
It solved my previous problems.
Obuli,
I had the same problem in 2.5.2 .
It looks that that call works in some situations (ie when I wasn't making http calls & was using symbol list from external file it was O.K.).
I wanted to run it in the background from a scheduled script.
Hence, to overcome it in the script written using JScript I created a String[] array containing list of symbols to download and pass it to the call
ex.:
var slist1 : String[] = [
"A","ADBE","APA","APC","AXP","ATVI","AKAM","AMGN","ALXN","APOL","BIDU","BBBY","BIIB","BRCM","BTU","BA","BGZ","BGU","BMC","CAT","CELG","CHKP","CHK","CMCSA","COST","CPL","CTRP","CTSH","CTXS","CVX"]
Trading financial instruments, including foreign exchange on margin, carries a high level of risk and is not suitable for all investors. The high degree of leverage can work against you as well as for you. Before deciding to invest in financial instruments or foreign exchange you should carefully consider your investment objectives, level of experience, and risk appetite. The possibility exists that you could sustain a loss of some or all of your initial investment and therefore you should not invest money that you cannot afford to lose. You should be aware of all the risks associated with trading and seek advice from an independent financial advisor if you have any doubts.