# Class Power#getOnOffTimeSchedule

Time

- Defined in: power.js

Class Summary
Constructor Attributes | Constructor Name and Description
--- | ---
| Power#getOnOffTimeSchedule(successCallback, errorCallback) Gets On/Off Time Schedule

## Class Detail

Power#getOnOffTimeSchedule(successCallback, errorCallback)
Gets On/Off Time Schedule

    // Javascript code
     function getOnOffTimeSchedule () {
         function successCb(cbObject) {
             console.log("cbObject : " + JSON.stringify(cbObject));
             for (var i = cbObject.onOffTimeScheduleList.length-1; i>=0; i--) {
                 console.log("onOffTimeScheduleList[" + i + "]._id : " + cbObject.onOffTimeScheduleList[i]._id);
                 console.log("onOffTimeScheduleList[" + i + "].day : " + cbObject.onOffTimeScheduleList[i].day);
                 console.log("onOffTimeScheduleList[" + i + "].offTime.hour : " + cbObject.onOffTimeScheduleList[i].offTime.hour);
                 console.log("onOffTimeScheduleList[" + i + "].offTime.minute : " + cbObject.onOffTimeScheduleList[i].offTime.minute);
                 console.log("onOffTimeScheduleList[" + i + "].onTime.hour : " + cbObject.onOffTimeScheduleList[i].onTime.hour);
                 console.log("onOffTimeScheduleList[" + i + "].onTime.minute : " + cbObject.onOffTimeScheduleList[i].onTime.minute);
             }
         }
         function failureCb(cbObject) {
             var errorCode = cbObject.errorCode;
             var errorText = cbObject.errorText;
             console.log ("Error Code [" + errorCode + "]: " + errorText);
         }
         var power = new Power();
         power.getOnOffTimeSchedule(successCb, failureCb);
     }

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

Since:
  1.5
Returns:
  {Object}

  Property | Type | Description
  --- | --- | ---
  onOffTimeScheduleList[] | Array | on/Off Time schedule list
  onOffTimeScheduleList[]._id | String | schedule id
  onOffTimeScheduleList[].day | String | day
  onOffTimeScheduleList[].offTime.hour | Number | off Time hour
  onOffTimeScheduleList[].offTime.minute | Number | off Time minute
  onOffTimeScheduleList[].onTime.hour | Number | on Time hour
  onOffTimeScheduleList[].onTime.minute | Number | on Time minute

See:
  Power.setOnOffTimeSchedule()
  Power.unsetOnOffTimeSchedule()