Welcome toVigges Developer Community-Open, Learning,Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
164 views
in Technique[技术] by (71.8m points)

Cron job is not working when I add log options

I have a cron job to execute a file upload to GCP storage. I am able to run the script is working fine.

When I changed it to a cron job it stops working.

*/5 * * * *  (eval mydate=`date +\%m\%d\%Y` ; /home/script/uploadFile.sh dev | tee -a /home/script/upload_log_$mydate)

It is creating an empty log file and file upload is not happening.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)
等待大神答复

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to Vigges Developer Community for programmer and developer-Open, Learning and Share
...