我有两个 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