Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我有一个 cron 作业,我通过crontab -e它从服务器备份某个文件并将其保存到我的家庭驱动器并带有时间戳。我一直执行它来测试它,但它似乎不起作用?
crontab -e
* * * * * /home/arran/hourly.bash > /home/arran
一定有什么我错过了?
您正在将命令的输出重定向到一个目录,该目录将失败。改为重定向到文件:
* * * * * /home/arran/hourly.bash > /home/arran/hourly.log