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.
========== EDIT
Thank you so much for everyone that pitched in, this was the command that eventually worked.
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.
Last edited by embus; 08-30-2016 at 07:40 AM..
Reason: Solved
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).
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).
You have to modify your call a little, like this:
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.
I see you're splitting the code and removing the ampersands.
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:
If i would have to use this in a wget-statement it would look like this:
Again, you might need to provide persistent identification information via "--keep-cookies", etc., as i said above.
Hi,
I need to download a zip file from my the below US govt link.
https://www.sam.gov/SAMPortal/extractfiledownload?role=WW&version=SAM&filename=SAM_PUBLIC_MONTHLY_20160207.ZIP
I only have wget utility installed on the server.
When I use the below command, I am getting error 403... (2 Replies)
Hi Guys,
Just entering the Linux word, So I need help to write a script on my local machine(Ubuntu 14.04) that continuously check the particular folder(contains images) and a json file on the server and download whenever new images are added to that folder and whenever there is a change in the... (10 Replies)
i have looked for a week and tried a few things, but nothing seems to work so joined here.
I have a go daddy account and also a vps in germany. In my vps, i run a code script (we will call it codegen) when i run ./codegen i get my question of how many codes do i want to make. With my answer... (9 Replies)
Long story short, I have everything working in my SOHO which would include Postfix,Dovecot(imap),Roundcube,bind and is ready to recieve email from the outside using this tutorial:
https://workaround.org/ispmail/wheezy
I also setup my internal DNS server using:
https://wiki.debian.org/Bind9... (2 Replies)
Hi I am very new to linux. I want to run a cronjob every 15 minutes that checks a directory for files. If the directory contains more than ten files I want it to send an email to me.
All I have is this...
*/15 * * * * ls -l | wc -l | | mail -s "This is just a test"
I would... (2 Replies)
hi everyone I'm newbie in this forum hope I can get some help here :)
I have a command in crontab that executed every 1 minute
sometime this command need more than 1 minute to finish
the problem is, the crontab execute this command although it's not finish processing yet and causing the system... (7 Replies)
Dear Guru,
I have submitted some cronjobs that has been running for quite sometimes. However, today I counter some cronjob did not run. Can you please explain what causes this to happen. Any system setting that limit number of cronjob per minutes to be started, etc?
Thanks.
Kelly (1 Reply)