WebPagetest Forums
Scheduled Test on Private Instance - Printable Version

+- WebPagetest Forums (https://www.webpagetest.org/forums)
+-- Forum: WebPagetest (/forumdisplay.php?fid=7)
+--- Forum: Private Instances (/forumdisplay.php?fid=12)
+--- Thread: Scheduled Test on Private Instance (/showthread.php?tid=14366)



Scheduled Test on Private Instance - KumarGupta - 06-10-2016 05:13 PM

Hi,

I have set up the private instance and would to schedule a job to test 10 URLS every day at different times like 8:00 AM, 12:00 PM, 4:00 PM, 8:00 Pm and 12:00 AM.

How can I achieve this on private instance?

Thank you!
Kumar.


RE: Scheduled Test on Private Instance - pdavis - 07-13-2016 03:49 AM

This probably isn't the cleanest way, but I used Cygwin's Curl in a batch file to make a call to WebPageTest. I tied the calling of my batch file into my build process, but you could also use CRON or Windows Task Scheduler. Here is roughly what my script looks like...

@echo off
SET Curl_Path="curl.exe"
SET Curl_Silent_Paramaters=-o /dev/null -s --compressed

%Curl_Path% %Curl_Silent_Paramaters% http://webpagetest.mydomain.com/runtest.php?url=https://www.mydomain.com/Page1.html
%Curl_Path% %Curl_Silent_Paramaters% http://webpagetest.mydomain.com/runtest.php?url=https://www.mydomain.com/Page1.html
%Curl_Path% %Curl_Silent_Paramaters% http://webpagetest.mydomain.com/runtest.php?url=https://www.mydomain.com/Page1.html
%Curl_Path% %Curl_Silent_Paramaters% http://webpagetest.mydomain.com/runtest.php?url=https://www.mydomain.com/Page1.html


RE: Scheduled Test on Private Instance - kzarifis - 07-14-2016 10:22 AM

You might find this wrapper written by Marcel Duran useful for issuing WPT tests programmatically:

https://github.com/marcelduran/webpagetest-api