Skip to content

Commit

Permalink
Got rid of bug
Browse files Browse the repository at this point in the history
Former-commit-id: d35dd0b [formerly 5426a00]
Former-commit-id: 78ac8bc
  • Loading branch information
Alex Epstein committed May 7, 2017
1 parent bf47952 commit 7b8d80e
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions js/script.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ var meridians = []; //array to hold the merdians to respective sleepTimes if mil
var tempTime = []; //used for a temperary purpose not sure if reffered to outside of function
var latestRelease = null;
var upTimeJob = null;
var resetTime = null;

function setTime() { //called when set wakeup time button is pressed
settings.set('Version','v1.4.2')
Expand Down Expand Up @@ -134,7 +135,7 @@ function generateSleepTimes() {
sleepTimes = sleepTimes.reverse(); //want earliest times to come first not last
wakeUpDate = new Date(sleepTimes[5]);
wakeUpDate.setHours(wakeUpDate.getHours() + 1);
sleepTimes[6] = new Date(wakeUpDate);
resetTime = new Date(wakeUpDate);
}


Expand Down Expand Up @@ -203,7 +204,7 @@ function nodeJobs() {
} catch (e) {

}
jobs[6] = schedule.scheduleJob(sleepTimes[6], setTime);
jobs[6] = schedule.scheduleJob(resetTime, setTime);

upTimeJob = schedule.scheduleJob('0 0 * * * *', function(){
upTimeJobs();
Expand Down

0 comments on commit 7b8d80e

Please sign in to comment.