wget - Cron output to nothing -


i've noticed cron outputs creating index.html files on server. command i'm using wget http://www.example.com 2>&1. i've tried including --reject "index.html*"

how can prevent output creating index.html files?

--2013-07-21 16:03:01--  http://www.examplel.com resolving example.com... 192.0.43.10 connecting www.example.com|192.0.43.10|:80... connected. http request sent, awaiting response... 200 ok length: 0 [text/html] saving to: `index.html.9'       0k                                                        0.00 =0s  2013-07-21 16:03:03 (0.00 b/s) - `index.html.9' saved [0/0] 

normally, whole point of running wget create output file. url http://www.example.com typically resolves http://www.example.com/index.html, creating index.html, wget command doing job.

if want run wget , discard downloaded file, can use:

wget -q -o /dev/null http://www.example.com 

the -o /dev/null discards log messages; -o /dev/null discards downloaded file.

if want sure wget writes stdout or stderr discarded:

wget -q -o /dev/null http://www.example.com >/dev/null 2>&1 

in comment, you're using wget command "trigger items on cron controller" using codeigniter. i'm not familiar codeigniter, downloading , discarding html file seems inefficient. suspect (and hope) there's cleaner way whatever you're trying do.


Comments

Popular posts from this blog

html5 - What is breaking my page when printing? -

c# - must be a non-abstract type with a public parameterless constructor in redis -

ajax - PHP/JSON Login script (Twitter style) not setting sessions -