I'm trying to automate a wget cronjob for Php 5.4 on Wordpress - using Cpannel on a linux server hosted by Godaddy. Below is the command I'm using, which isn't working.
In my case, putting a simple - dash after the -O fixed the problem.
In my case, I simply wanted to call the link to process a script in wp-cron.php.
If someone could clue me/others in as to why the - made the difference I'd appreciate it.
Leave out wget's -q , which stands for "quiet". Also remove the 2>&1 to see which errors/messages are being written to STDERR.
If you want to see all things that are written to STDOUT too, leave out >/dev/null 2>&1 too. This might help to see at which position the errors occure.
Thanks for that, I see a little more clearly how the q works now. This is the response I get, suggesting it can't read the URL. I can't post urls here yet, but i've put it in as lynora.co.uk, (with a http above).
wget: missing URL
Usage: wget [OPTION]... ...
Try �wget --help� for more options.
Notice that you may need to save cokkies in a file if you need to operate persistent connections (like in logging into a website, doing something, then logging off). See the --save-cookies=<file> , --load-cookies=<file> and the --keep-session-cookies parameters of wget .
No, no, you need the ampersands. after the "--post-data" you put everything you have in your URL string, you just keep the URL itself as the last parameter.
Here is an example: When i reply to this thread my browser shows a URL like this: