【问题标题】:schtasks warning account information could not be set from php code无法从 php 代码设置 schtasks 警告帐户信息
【发布时间】:2013-03-09 09:08:51
【问题描述】:

我正在尝试从命令行运行 schtask,它可以正常工作,但在尝试通过 PHP 运行时出现错误:“无法设置帐户信息”。我的 IIS 版本是 6.0

警告:计划任务“BuildInstaller_6”已创建,但可能无法运行,因为无法设置帐户信息。

我运行的命令行是:

schtasks /create /tn "BuildInstaller31" /tr "E:\\TCS\\build\\scripts_5.2\\build.bat" /sc ONCE /st 13:25:30 /RU "TCS-SJCBUILD\\Administrator" /RP "xxxx"

【问题讨论】:

    标签: php windows scheduled-tasks


    【解决方案1】:

    对我来说,我只是启用任务计划程序服务。以下是对我有用的:

    FOR /F %%X IN (C:\list of workstations.txt) DO (
    sc %%X config "Service name" start= auto
    sc %%X start "Service Name"
    schtasks /Create /TN "task name" /TR "path to task" /sc "daily" /st "time" /sd "date I want to start the task" /s \\%%X /U "username" /P "password"
    pause
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2020-06-22
      • 1970-01-01
      • 2020-07-28
      相关资源
      最近更新 更多