【发布时间】:2026-01-13 05:45:02
【问题描述】:
我正在使用云桌面并尝试执行具有以下命令的 ./parseScript.sh:
我想使用以下命令每小时调用一次这个脚本:
Step 1. Connect to your cloud desktop using ssh.
Step 2. Run these commands:
% screen
% while true; do ./parseScript.sh; sleep 3600; done
Step 3. Close the window with the running command.
Step 4. (same as Step 1) Connect to your cloud desktop using ssh.
Step 5. Run this command: screen -R. You will get back to the session you left in step 3.
现在的问题是,在我的脚本中,我有上面提到的 1 个命令,必须使用 sudo -u identmon 执行,因此每次都会要求输入密码,除了手动之外,是否可以每小时运行一次这个脚本?
【问题讨论】:
-
你有 ssh 访问权限吗?
-
是的,我有。
标签: bash sudo gnu-screen