Hey all, I have a droplet in the Bangalore region and I’m facing a problem where my crons are not being picked up if I specify a time. This is what I’ve debugged so far:
sudo tail -f /var/log/syslog Apr 27 00:45:01 by2rides-app-2 cron: (*system*by2rides-auto-create) RELOAD (/etc/cron.d/by2rides-auto-create)
I created this file /etc/cron.d/by2rides-auto-create itself at exactly Apr 27 10:20 - so clearly the syslog is in a different timezone. Additionally, I also checked this.
cat /etc/timezone Asia/Calcutta
And my cron.d was very specific:
21 10 * * 1-5 root curl --request GET http://localhost:8080/xyz
The cron is not being piked up. However, if I change it by removing concept of time altogether and keep it at a interval, it gets picked up. So clearly we have timezone issues !
*/5 * * * 1-5 root curl --request GET http://localhost:8080/xyz
Anyone else faced this issue ?
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.
Join our DigitalOcean community of over a million developers for free! Get help and share knowledge in Q&A, subscribe to topics of interest, and get courses and tools that will help you grow as a developer and scale your project or business.
Click below to sign up and get $200 of credit to try our products over 60 days!