I would like to setup a task within task scheduler to do the following:

at a certain time every day, open a web browser at a certain URL and then execute some javascript against that page.

I know you can execute some JS via the address bar by going to the url of 'javascript:someFunction()' but I don't know if it's possible to string these commands together and how to do it.

link|improve this question
What's your end goal with this? If this is a batch task, could you do what you need to do with things like wget/powershell/cmd. – SmallClanger May 26 '11 at 16:17
well, I want to open a remote website and start executing a task which can only be started with javascript. I have no control over this site, else I'd implement a url based trigger. – Martyn May 26 '11 at 16:46
Are you just trying to scrape the screen or something? Using wget may be your best bet either way, just point it towards the .js file (if one exists). – Matthew May 26 '11 at 17:41
No, actually want to open the browser and set a task executing. I then want to leave the browser window open as the task takes a long time and I can check the results at a later time. – Martyn May 27 '11 at 11:07
feedback

1 Answer

We're doing such things by using Selenium. It will properly open the browser and then you may be able to execute javascript in your page

link|improve this answer
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.