指定日志文件的路径
jerrymakesjelly opened this issue · 1 comments
jerrymakesjelly commented
最后问下,怎么在与config.yml同级的文件夹下做个log,把每次执行的结果都保留下来?
Originally posted by @Se7enMuting in #5 (comment)
wxlg1117 commented
曲线解决啊那就在crontab添加任务加重定向到文件(加了--view做示例):
#执行任务并且生成一个此次任务执行log文件(文件名以任务执行时间命名);
*/2 * * * * /usr/local/bin/autoremove-torrents --view --conf=/data/autoremove-torrents/config.yml >>/data/art_date +\%Y\%m\%d_\%H\%M\%S
.txt 2>&1 &
#执行任务并且在指定log文件末尾追加此次任务执行log;
*/2 * * * * /usr/local/bin/autoremove-torrents --view --conf=/data/autoremove-torrents/config.yml >>/data/art.txt 2>&1 &