curl-users
Re: How to use cURL in cron?
Date: Mon, 10 Oct 2016 11:42:41 +0000 (UTC)
Hi,
I got it going. I used the quotes before and after the command. I removed them and everything went fine!
Thanks
Chanikya Chanikya Nadh Desu
106 Arrowhead LaneAltona Manitoba
Canada R0G 0B1
Phone (905)615-0784, (204)319-7010
On Saturday, October 8, 2016 1:10 PM, Spork Schivago <sporkschivago_at_gmail.com> wrote:
Chanikya,
On one of my Linux boxes, I can run the run-parts executable to have it process the crontab entries but I feel Dan is correct and perhaps there's something wrong with your crontab entry. Maybe try passing the full path to the curl executable to see if anything changes? Also, for troubleshooting purposes, perhaps you could redirect the output to some file, just to see if there's any error messages being thrown, maybe something like this:
0 6 * * 1-5 /usr/bin/curl --silent http://192.168.3.201/30000/15%c2%a02>&1 >/home/youruserdir/cronoutput.log
or something similar.
On Sat, Oct 8, 2016 at 1:30 AM, Dan Fandrich <dan_at_coneharvesters.com> wrote:
On Fri, Oct 07, 2016 at 08:15:08PM +0000, Chanikya Nadh Desu via curl-users wrote:
> Hi,
>
> I need this http request to be sent on the network.
>
> http://192.168.3.201/30000/15
>
> Now I used the following format in the crontab.
>
> 0 6 * * 1-5 curl --silent http://192.168.3.201/30000/15
>
> And nothing is happening!
>
> I am using Ubuntu 16.04
This is unlikely to be a curl problem. Is the curl binary in the standard
location (/usr/bin/curl)? Is the system time zone what you assume, given the
times in the crontab? Does the command work if run on the command-line?
Do you have crond installed and running?
>>> Dan
------------------------------ ------------------------------ -------
List admin: https://cool.haxx.se/list/ listinfo/curl-users
FAQ: https://curl.haxx.se/docs/faq. html
Etiquette: https://curl.haxx.se/mail/ etiquette.html
-------------------------------------------------------------------
List admin: https://cool.haxx.se/list/listinfo/curl-users
FAQ: https://curl.haxx.se/docs/faq.html
Etiquette: https://curl.haxx.se/mail/etiquette.html
-------------------------------------------------------------------
List admin: https://cool.haxx.se/list/listinfo/curl-users
FAQ: https://curl.haxx.se/docs/faq.html
Etiquette: https://curl.haxx.se/mail/etiquette.html
Received on 2016-10-16