Start a detached background process in PowerShell

前端 未结 4 2198
小蘑菇
小蘑菇 2020-12-14 18:46

I have a Java program which I would like to launch as a background process from a PowerShell script, similar to the way a daemon runs on Linux. The PowerShell script needs

4条回答
  •  南笙
    南笙 (楼主)
    2020-12-14 19:12

    Consider using the task scheduler for this. Define a task and set it without any triggers. That will allow you to simply "Run" (manually trigger) the task.

    You can set up and/or trigger scheduled tasks using the ScheduledTasks powershell module, or you can use the GUI.

提交回复
热议问题