• I am trying to find out the status of a website if up or down then send an email with the result, what should I do?
    I have created a new task with the following information:

    action:
    Check Web Site

    Web Page URL:
    https://hggddggh.com/

    After I ran the task I found nothing in the log. what should I do to find the result and send it to email?

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author miunosoft

    (@miunosoft)

    Hi,

    You need to select the Exit Code occurrence type for that. Also, you want to use WordPress 5.4 or below for the time being until it is fixed. Plus, Sending Emails may fail with WordPress 5.3 or above and to fix it, you want to try the development version.

    Try these steps.

    1. Have a site with WordPress 5.4.
    2. Install Task Scheduler v1.5.0b03.
    3. Create a task with an action, Check Web Site.
    4. Select Head for the HTTP Request Method option.
    5. Create a task with the Exit Code occurrence.
    6. Type the task name created in the above Step 3.
    7. Set an exit code. The Check Web Site action’ exit codes for the Head method type are
    1: when HTTP Status is 2xx
    0: when the action could not be performed
    – HTTP Status Code such as 400 and 500 etc.

    There are various HTTP status codes and currently the Exit Code occurrence only accepts one exit code per task. I’ll think of adding the ability to accept multiple exit codes.

    Plugin Author miunosoft

    (@miunosoft)

    The development version 1.5.0b04 includes lots of fixes and with it now it resolves the incompatibility issue with WordPress 5.5.

    Also, multiple exit codes can be set with this version. Plus, the Negate option is added. So you can simply set 1 and enable the Negate option to trigger the Email action when HTTP Status is not 2xx.

    Please try it and let me know if you can achieve what you are trying to do.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Trying to get a website status’ is closed to new replies.