安排Windows任务以打开包含用户名和密码的页面

How would you run a windows task schedule to open a webpage, post login information and then run the url?

Background:

CRM has crons that were setup for a linux only. It has a manager where I can run the jobs as well manually. I want to run the web url that does these jobs manually through the windows server but requires that each time it connect it login with a specific user.

How would I setup a scheduled task on windows server that : 1. Opens and Logs into page then runs the url for the manual job.

  1. Runs every minute

So essentially it needs to look like this:

http://thewebsitename.com/?username=someuser&password=apass
http://thewebsitename.com/theurltorunjobmanually.php

Can scheduled tasks run a php command instead as well? For example if I set up a WGET script, could the scheduler run that php script? Have not been able to figure out how to do this, linux seems to be pretty easy in this scenario

This could be as simple as:

wget --post-data "username=someuser&password=apass" http://thewebsitename.com/
wget http://thewebsitename.com/theurltorunjobmanually.php

You also asked about running a PHP script via the scheduled task, you can add this line to the batch script:

C:\path\to\PHP.exe script.php

Not sure if you're looking for methodology or an actual solution, but we have a process somewhat like this where we need to login to our CRM and run an upload, task creation process at regular intervals. Used to be manual but now we use an automation software product, Foxtrot. You can find it here for whatever it is worth: http://www.enablesoft.com/foxtrot-professional/

You can put the cURL or wget commands in a batch file or PowerShell script and have the Windows Task Scheduler call it.