Ubuntu Terminal access a website every day

0

I'm working with a WebService (SOAP + XML) that requires access every day on a link, I want to automate this service on my Ubuntu Server, I thought of using Lynx along with CronTab to access the link and then close, follows the CronTab code:

0 6 * * * lynx https://site.com/WebService
1 6 * * * killall lynx

So, access occurs every day at the same time and after a minute it closes everything that exists in Lynx, the problem is that it does not work!

It accesses the link, but it is as if it "did not activate the XML" of the page, therefore, WebService does not work

The code page was developed in PHP and using cURL to call / execute XML. If you access the link through a browser, it works perfectly

Is there any way to resolve this? Or another method to automate this access?

    
asked by anonymous 16.04.2017 / 23:55

1 answer

1

Have you tried using CURL directly? So:

0 6 * * * curl --silent https://site.com/WebService

A doubt? Do you need PHP to call webservice? I mean unless you need to save something on the site, like passwords or data downloaded or send data from the site, you could access the WS directly through the terminal, or create a PHP script on the machine itself, of course I'm guessing it all , because I do not know how you're doing.

But if you have no reason to specify to use the script on the site then you could do something like:

0 6 * * * php /home/meuusuario/scripts/webservice.php
    
17.04.2017 / 00:11