no crontab for root - using an empty one crontab: installing new crontab "/tmp/crontab.Ar0WMU":1: bad hour errors in crontab file, can't install. Do you want to retry the same edit?
时间: 2024-01-09 15:12:06 浏览: 41
如果你确定已经修复了 crontab 文件中的时间格式错误,可以尝试重试相同的编辑。如果你不确定如何修复 crontab 文件中的错误,请检查 crontab 文件中的每一行,确保每个字段都是正确的格式。另外,你可以将 crontab 文件保存到其他地方,然后重新创建一个新的 crontab 文件,以确保没有其他错误。如果问题仍然存在,请检查你的 cron 服务是否正在运行,并且没有其他错误导致无法安装 crontab 文件。
相关问题
no crontab for root - using an empty one crontab: installing new crontab "/tmp/crontab.H7mbdO"
这个报错是因为在Linux服务器上尝试为root用户创建定时任务时发生的。"no crontab for root - using an empty one crontab: installing new crontab"的意思是root用户没有预设的定时任务,因此会安装一个空的定时任务。然而,由于权限问题,无法在指定的目录/var/spool/cron/创建新的定时任务文件/tmp/crontab.H7mbdO。<span class="em">1</span><span class="em">2</span><span class="em">3</span>
#### 引用[.reference_title]
- *1* *2* *3* [linux no crontab for root - using an empty one Permission denied](https://blog.csdn.net/marchcma/article/details/111272443)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_1"}}] [.reference_item style="max-width: 100%"]
[ .reference_list ]
no crontab for root - using an empty one crontab: installing new crontab "/tmp/crontab.Ar0WMU":1: bad hour errors in crontab file, can't install.
这个错误通常出现在 crontab 文件中有错误的时间格式。请检查你的 crontab 文件中的时间格式是否正确。例如,时间格式应该是 0-59 的数字,而不是字符串。你也可以使用 crontab -e 命令编辑你的 crontab 文件,然后保存并退出。如果问题仍然存在,请尝试重新安装 cron 服务。