├── ping.gs └── README.md /ping.gs: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright DevAnaZ 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | function ping() { 18 | var pingurl='https://YOUR-WEBSITE.herokuapp.com' 19 | var response = UrlFetchApp.fetch(pingurl); 20 | Logger.log(response.getContentText()); 21 | } 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Website-Pinger 2 | Website pinger is a free pinger by using free google script(gs). 3 | You can ping your website whenever you want whether it is day based, month based, time based, hourly based or minute based. 4 | This will also gives a clean overview about analytics errors for your website. 5 | 6 | 7 | 8 | 9 | ### Requirements 10 | * A free google account 11 | 12 | ## How to use 13 | * sign in to a google account 14 | * Go to https://script.google.com 15 | * Click `a new project` , You can rename default name `Untitled project` to whatever you like. 16 | * Then in code editor remove all existing codes and paste the below code replaced with your own website. 17 | 18 | ``` 19 | function ping() { 20 | var pingurl='https://last-bird.herokuapp.com' 21 | var response = UrlFetchApp.fetch(pingurl); 22 | Logger.log(response.getContentText()); 23 | } 24 | 25 | ``` 26 | 27 | * Then click on save button to save the project 28 | * After saving, a `RUN` button appears 29 | * click on `Run` button 30 | Review Permissions > Click `YOUR GOOGLE ACCOUNT` > If it shows `Google hasn’t verified this app` > Then click `Advanced` > `Go to Untitled project (unsafe)` > `Allow` 31 | * After above step your project has permission to run gs. 32 | * Run Trigger script to configure When you need to ping your URL or website 33 | ### Trigger 34 | * After doing above step on left menu you can see trigger option > click it 35 | * Then on Botton Right Corner You can see `Add Trigger` Button > click it 36 | * Then set `Select event source`, `Select type of time based trigger` & `Select hour interval` as per you needs and save it. 37 | 38 | --------------------------------------------------------------------------------