shutdown PC after finishing a script

后端 未结 1 1438
一整个雨季
一整个雨季 2021-01-11 19:23

I\'m runnig a script in R that takes many hours. I woud like that my PC automatically shutdown itself after finish my script. Is that possible? How can I do that using R? I

相关标签:
1条回答
  • 2021-01-11 19:55

    You can call the cmd prompt directly from R

    system('shutdown -s')
    

    You can view other shutdown commands here: https://stackoverflow.com/a/162305/1362215. This may be useful if you want to perform other tasks.

    0 讨论(0)
提交回复
热议问题