with this cronjob:
0 * * * * usr/bin/open http://www.myurl.com/mypage.php
I open this URL every hour from my OS (MacOS). When called this way, MacOS opens the default browser and reaches that web page.
Is there any way to modify my cronjob to request a webpage without opening it with browser?
Use
curlinstead ofopen. It is installed on OS X by default.If you just want it to open the URL and to discard any contents and not worry about any error handling, you can do something like this:
Chances are, though, that you care about error handling and possibly saving the output as well. There are lots of options to get it to do exactly what you want, so check the documentation.*
*From a terminal window on your Mac, you can type
man curland it should give you some information. It may not be the most easy to digest depending on your comfort level with old-school Unix documentation. But you should at least be able to get an idea of what all the different command line flags do.