# Class Power#deleteOnTimer

Power

- Defined in: power.js

Class Summary
Constructor Attributes | Constructor Name and Description
--- | ---
| Power#deleteOnTimer(successCallback, errorCallback, options) Deletes 'on timer'.

## Class Detail

Power#deleteOnTimer(successCallback, errorCallback, options)
Deletes 'on timer'. The timer in the list that matches the parameter will be removed.

    // Javascript code
    function deleteOnTimer () {
      var options = {
         hour : 9,
         minute : 0,
         week : Power.TimerWeek.MONDAY + Power.TimerWeek.FRIDAY,
         inputSource : "ext://hdmi:1"
      };

      function successCb() {
         // Do something
      }

      function failureCb(cbObject) {
         var errorCode = cbObject.errorCode;
         var errorText = cbObject.errorText;
         console.log ("Error Code [" + errorCode + "]: " + errorText);
      }

      var power = new Power();
      power.deleteOnTimer(successCb, failureCb, options);
    }

Parameters:
{Function} successCallback
  success callback function.
{Function} errorCallback
  failure callback function.
{Object} options

  Property | Type | Description | Required
  --- | --- | --- | ---
  hour | Number | hour (0~23) | required
  minute | Number | minute (0~59) | required
  week | Number | week Power.TimerWeek To use it on multiple day of week, set the sum of week. For example, 1 + 64 (Power.TimerWeek.Monday + Power.TimerWeek.Sunday) means that this timer works on every Monday and Sunday. | required
  inputSource | String | Define the input source. ext://[externalInput]:[portNum]. (eg: "ext://hdmi:1") | required

Since:
  1.0
Returns:

  If the method is successfully executed, success callback function is called without a parameter. If an error occurs, failure callback function is called with failure callback object as a parameter.

See:
  Power.getOnTimerList(), InputSource.getInputSourceStatus()