Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/shell/5.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Ubuntu 如何在没有';at';并使用';crontab';_Ubuntu_Scheduled Tasks - Fatal编程技术网

Ubuntu 如何在没有';at';并使用';crontab';

Ubuntu 如何在没有';at';并使用';crontab';,ubuntu,scheduled-tasks,Ubuntu,Scheduled Tasks,我想在6小时后只运行一次命令(模拟) 我在遇到“”来完成我的工作,但不幸的是我没有安装该软件包的权限 我还遇到了“crontab”,它将时间和日期作为参数 在我的例子中,我只想在6小时后运行一次模拟命令。这是否可能使用crontab,还是我太野心勃勃了 如果您能提示我其他选择,我将不胜感激。您可以制作一个休眠6小时的shell脚本,然后执行您的命令。“现在”运行它,您的命令将在六小时后执行一次 #!/bin/bash sleep 6h # or, "sleep 21600" if your

我想在6小时后只运行一次命令(模拟)

我在遇到“”来完成我的工作,但不幸的是我没有安装该软件包的权限

我还遇到了“crontab”,它将时间和日期作为参数

在我的例子中,我只想在6小时后运行一次模拟命令。这是否可能使用crontab,还是我太野心勃勃了


如果您能提示我其他选择,我将不胜感激。

您可以制作一个休眠6小时的shell脚本,然后执行您的命令。“现在”运行它,您的命令将在六小时后执行一次

#!/bin/bash

sleep 6h  # or, "sleep 21600" if your system doesn't support the "6h" syntax
yourcmd
看见