Now you have learned to use Linux and commands you'll use in your daily work. Let's test your knowledge with a final project!
Build a cronjob! What should it do?
Built the following script that is executed by the cronjob
- make an Rest API call via curl (you can choose the API)
- Example 1: Pokemon API: https://pokeapi.co/
- Example 2: Chuck Norris jokes: https://api.chucknorris.io/jokes/random
- Example n: other APIs: https://medium.com/codex/15-fun-and-interesting-apis-to-use-for-your-next-coding-project-in-2022-86a4ff3a2742
- get the value of the return
- put in a log file with the time
- the job should execute every 5 minutes
The minimal value for a cronjob is 1 minute, so you can use it for testing. Otherwise let it run for an hour and see what the result is.