If I put the following in crontab -e
:
* * * * * date +"%Y-%m-%d" > /home/apps/temp/env.txt
there is no env.txt
created.
If I change the above line to:
* * * * * date > /home/apps/temp/env.txt
env.txt
is created properly.
How can I format date
in cron?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…