0

I am trying to get the response time of a server so for example I am using below curl command I got of the internet

curl -w "@curl-format.txt" -o /dev/null -s http://wordpress.$

The curl-format.txt looks like the following:

n
        time_namelookup:  %{time_namelookup}n
           time_connect:  %{time_connect}n
        time_appconnect:  %{time_appconnect}n
       time_pretransfer:  %{time_pretransfer}n
          time_redirect:  %{time_redirect}n
     time_starttransfer:  %{time_starttransfer}n
                        ----------n
             time_total:  %{time_total}n
n

This command works fine when called through the command line.

However when I try to use it in crontab and output the times to a file called Restime.text it does not work.

Below is the crontab command I am using.

* * * * * /usr/bin/curl -w "@curl-format.txt" -o /dev/null -s http://wordpress.$ >> /home/ubuntu/newApp/Restime.txt 

Any advice as to where I am going wrong ?

Kind Regards.

DugD
  • 1

0 Answers0