透過 crontab 執行 screen - Linux
By Agnes
at 2015-04-02T16:17
at 2015-04-02T16:17
Table of Contents
感謝 kenduest 大 XD
其實我下午也有想到透過 ssh , 不過下午只測到
ssh -t user@localhost screen -dmS MySvr "command to run server"
執行完後, screen 的狀態是 dead 就沒再繼續了...
推 kenduest: 我幫你測試一下一個強迫方式你可以玩玩看 04/02 14:56
→ kenduest: ssh 連線可以強迫配置 tty 提供使用 04/02 14:57
→ kenduest: 所以你就先用 ssh-keygen 建立必要 public/private key04/02 14:57
→ kenduest: 配置 public key 方式可以登入自己 localhost 機器04/02 14:57
→ kenduest: 也就是 ssh userid@localhost 時候不用密碼就登入04/02 14:57
→ kenduest: 然後 crontab 內新增運作的執行命令部分就是:04/02 14:58
→ kenduest: ssh -t -t localhost "TERM=linux screen vi" 04/02 14:58
→ kenduest: 這個就是跑 vi... 記得 ssh -t 那個 -t 參數要兩次04/02 14:58
→ kenduest: TERM 那是要指定終端機類型,沒指定 screen 會無法運作04/02 14:59
我再來慢慢試試看~ 感謝 :D
--
Tags:
Linux
All Comments
By Harry
at 2015-04-07T15:58
at 2015-04-07T15:58
By Barb Cronin
at 2015-04-08T12:01
at 2015-04-08T12:01
By Kama
at 2015-04-09T14:19
at 2015-04-09T14:19
By Jessica
at 2015-04-14T02:13
at 2015-04-14T02:13
By Barb Cronin
at 2015-04-17T21:48
at 2015-04-17T21:48
By Rae
at 2015-04-19T18:10
at 2015-04-19T18:10
Related Posts
求救, bashrc壞了, 無法登入
By Hedda
at 2015-04-02T09:30
at 2015-04-02T09:30
win8 使用VirtualBox 建Bridge虛擬機
By Daph Bay
at 2015-04-02T00:28
at 2015-04-02T00:28
透過 crontab 執行 screen
By Oliver
at 2015-04-01T18:38
at 2015-04-01T18:38
play 264 stream
By Agatha
at 2015-04-01T17:54
at 2015-04-01T17:54
透過 crontab 執行 screen
By Audriana
at 2015-04-01T16:44
at 2015-04-01T16:44