I'm running Ubuntu and got a simple cronjob fetching a remote JSON-file and (over)writing it to the server.
*/15 * * * * /usr/bin/curl -m 120 -s https://path/to/remote/json.json > /store/json/here.json
However I need to make sure the external JSON actually returns data before it overwrites the JSON file located on the server.
How can I achieve this? I've found some ways to do it straight in bash, but doesn't seem to work when I put in the crontab.