I have bash a script like the following
#!/bin/bash
date
curl http://lab.nextt.com.br/somefile1.html -z ../public_html/somefile1.html -o ../public_html/somefile1.html --silent --show-error --location
curl http://lab.nextt.com.br/somefile2.html -z ../public_html/somefile2.html -o ../public_html/somefile2.html --silent --show-error --location
curl http://lab.nextt.com.br/somefile3.html -z ../public_html/somefile3.html -o ../public_html/somefile3.html --silent --show-error --location
curl http://lab.nextt.com.br/somefile4.html -z ../public_html/somefile4.html -o ../public_html/somefile4.html --silent --show-error --location
and I have a cronttab like this
* * * * * /home/user/cronjobs/cronjob-updatefiles >> /home/user/cronjobs/log
My intention is: whenever there is an update on a public file, download it to my server.
So good so far.
When I run the script manually on the shel, the files are downloaded and updated as expected.
And the cron is running the... The /home/user/cronjobs/log is being updated with the date (on the beggining of the script). But the curl commands are not executed via cron. The files are not updated.
Why when I run directly on the shell it works and when I run via cron it does not?