我有两个python脚本:
#1. getUrl.py # used to collect target urls which takes about 10 mins and used as the input for the next script
#2. monitoring.py # used to monitoring the website.
00 01 * * * /usr/bin/python /ephemeral/monitoring/getUrl.py > /ephemeral/monitoring/input && /usr/bin/python /ephemeral/monitoring/monitoring.py >> /ephemeral/monitoring/output
我将此命令放在crontab中,想知道如何将这个长命令写成两三行。类似于下面的python行分隔符示例,但适用于Crontab命令,因此更具可读性:
>>> print \
... 'hel\
... llo'
helllo
最佳答案
不,你不能那样做。从手册页:
您可以将命令放在脚本中并运行。
关于linux - Crontab命令分隔线,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/18661492/