Run command `at ` 5 seconds from now

前端 未结 8 1813
甜味超标
甜味超标 2020-12-29 05:03

As part of a slightly complex script, I need to tell a server to run a simulation. Normally, I would achieve this by doing ssh user@server \'simulation/script\'

8条回答
  •  清酒与你
    2020-12-29 05:11

    Redirecting stdin/stdout/stderr in addition to backgrounding the script will allow the SSH session to close immediately after executing the backgrounded command:

    ssh hostname "/path/to/script /dev/null 2>/dev/null &"
    

    Source: https://serverfault.com/a/36436/138334.

提交回复
热议问题