cron job

Web hosting discussion, programming, and shared and dedicated servers.
12 posts Page 2 of 2
by Metalshark » Tue Jun 21, 2016 9:59 am
joemuller wrote:If you just put a URL in your crontab, it's not going to work - you're just going to get a lot of error messages. I recommend pre-pending the URL with wget or curl like so: (http://stackoverflow.com/questions/11375260/)

Code: Select all

curl http://example.com/test.php
The wget seems to work for me but it downloads the whole php file from the server and its just such a pain to delete it. Any suggestions on how to stop it from downloading the php script?
by Guest » Tue Jun 21, 2016 6:54 pm
Check out wget's man page.

Code: Select all

man wget
You can do it like this:

Code: Select all

wget -O - $URL >> /tmp/outfile
outfile will contain the stdout of the URL.
12 posts Page 2 of 2

Who is online

In total there are 118 users online :: 0 registered, 0 hidden and 118 guests (based on users active over the past 5 minutes)
Most users ever online was 999 on Mon May 10, 2021 1:02 am

Users browsing this forum: No registered users and 118 guests