远程访问Tomcat服务

时间:2016-08-23 10:02:44

标签: batch-file remote-access remote-debugging tomcat8

我想从Windows服务器远程部署到另一台Windows服务器,我需要远程启动和停止tomcat服务。 但我无法访问该服务(启动或停止服务),在任务计划程序中配置了tomcat服务,我想在批处理脚本中运行Tomcat through命令。当我运行命令时,在我要部署的特定服务器中,它可以正常工作,但远程命令cudn不能访问Tomcat服务。请帮助我。

1 个答案:

答案 0 :(得分:0)

您可以使用schtasks命令远程运行/修改/ etc ...预定任务。

Microsoft schtasks command

schtasks /run /s <machine name> /tn <task name>

命令控制台帮助

`C:\>schtasks /?`

SCHTASKS /parameter [arguments]

Description:
    Enables an administrator to create, delete, query, change, run and
    end scheduled tasks on a local or remote system. Replaces AT.exe.

Parameter List:
    /Create         Creates a new scheduled task.

    /Delete         Deletes the scheduled task(s).

    /Query          Displays all scheduled tasks.

    /Change         Changes the properties of scheduled task.

    /Run            Runs the scheduled task immediately.

    /End            Stops the currently running scheduled task.

    /?              Displays this help message.

Examples:
    SCHTASKS
    SCHTASKS /?
    SCHTASKS /Run /?
    SCHTASKS /End /?
    SCHTASKS /Create /?
    SCHTASKS /Delete /?
    SCHTASKS /Query  /?
    SCHTASKS /Change /?

你的帖子缺乏信息。你能更具体地解决你的问题吗?

希望下面的命令有所帮助。

相关问题