dongxiang5879 2014-10-13 14:37
浏览 59
已采纳

安排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

  • 写回答

3条回答 默认 最新

  • douluo3256 2014-10-13 15:34
    关注

    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
    
    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(2条)

报告相同问题?

悬赏问题

  • ¥20 西门子S7-Graph,S7-300,梯形图
  • ¥50 用易语言http 访问不了网页
  • ¥50 safari浏览器fetch提交数据后数据丢失问题
  • ¥15 matlab不知道怎么改,求解答!!
  • ¥15 永磁直线电机的电流环pi调不出来
  • ¥15 用stata实现聚类的代码
  • ¥15 请问paddlehub能支持移动端开发吗?在Android studio上该如何部署?
  • ¥20 docker里部署springboot项目,访问不到扬声器
  • ¥15 netty整合springboot之后自动重连失效
  • ¥15 悬赏!微信开发者工具报错,求帮改