Hi, everyone. You are about to use cron in Ubuntu version 16.04. The basic usage instructions are shown in ZetaWiki as below, so I was going to refer to them and use them.
* * * * * * Commands to Perform
┬ ┬ ┬ ┬ ┬
│ │ │ │ │
│ │ │ │ │
│ │ │ -- --------- Day (0-6) (0: Sunday, 1: Monday, 2: Tuesday, …, 6:Saturday)
│ │ -- └--------- Month (1 - 12)
│ │ ----------- Day (1 - 31)
│ ----------- hour (0-23)
└--------- Minutes (0-59)
In my case, since I use heroku, I try not to use the watch dog from 0 to 7 to use it in the pretier, and I try to wake up every 20 minutes because it changes to sleep mode every 30 minutes. So I did the following, but it didn't work.
0,20,40 7-0 * * * curl API_SERVER_URL
[Voiceover] Yeah, the poem (0-23) says, and I don't think my syntax is even in the Zetawiki manual. I ask for your help. Thank you.
crontab cron linux ubuntu
Oh, I was stupid. It's before midnight, so I'm doing cron until 23:20, 23:40.
0,20,40 7-0 * * * curl API_SERVER_URL
That's right.
© 2024 OneMinuteCode. All rights reserved.