【问题标题】:Set a scheduling task (Windows Hosting) in Parallels Plesk Panel在 Parallels Plesk Panel 中设置计划任务 (Windows Hosting)
【发布时间】:2013-01-01 11:01:14
【问题描述】:

我需要设置一个调度任务(Windows Hosting)。我配置如下

Path to executable file = C:\Program Files (x86)\Parallels\Plesk\Additional\PleskPHP5\php.exe

Arguments = C:\Inetpub\vhosts\example.com\httpdocs\accompalive\Scheduler.php

Accompalive 是根文件夹名称,aspiresoftwareconsultancy 是域名。我也尝试使用 example.com 作为域名,但 schedular 没有运行。我将每小时、每天、每周、每月、每年每 2 分钟设置为计时。我还设置了一个通知电子邮件地址。但我收到一封带有错误文件的电子邮件,其中包含消息"Could not open input file: C:\Inetpub\vhosts\aspiresoftwareconsultancy.tld\httpdocs\accompalive\Scheduler.php"。我是否正确设置或需要一些更改?谢谢。

【问题讨论】:

  • 嗯,我的名字里有aspire :)
  • 是什么让您认为问题与调度程序有关?您确定您的调度程序脚本没有问题吗?
  • 我已经在我的服务器上手动测试了整个路径,我得到了正确的输出。我只想要计划任务来运行该文件。
  • 谢谢,我通过将“aspiresoftwareconsultancy.tld”替换为“aspiresoftwareconsultancy.com”解决了这个问题

标签: php scheduled-tasks


【解决方案1】:

现在快一年了。

但是由于这个问题没有答案,所以我发现了以下内容:

如果脚本可以使用解释器(例如 PHP 或 Perl)执行,并且不需要在 HTTP 请求中定义参数,则创建一个新的计划任务,以脚本的路径作为选项调用脚本解释器

你可以这样做:

C:\Program Files (x86)\Parallels\Plesk\php\bin\php.exe <path to your php script> <input file>output file 2>&1

更多见:http://kb.sp.parallels.com/en/115292

希望对你有帮助:)。

【讨论】:

    【解决方案2】:

    我使用了你的代码,它对我有用。

    Path to executable file = C:\Program Files (x86)\Parallels\Plesk\Additional\PleskPHP4\php.exe
    Arguments = C:\Inetpub\vhosts\example.com\httpdocs\accompalive\Scheduler.php
    

    如果您对scheduler.php 或错误代码进行了验证,则它无法工作。

    当我使用 get 方法(如 Arguments = C:\Inetpub\vhosts\example.com\httpdocs\accompalive\Scheduler.php?id=12)发送一些数据时,我还在电子邮件中收到了文本文件(实用程序输出),他们说 "Could not open input file"

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2013-12-29
      • 2011-01-19
      • 2011-07-07
      • 2021-02-01
      • 2012-02-22
      • 2015-12-23
      • 1970-01-01
      相关资源
      最近更新 更多