Comparing version 0.9.8 to 0.9.9
{ | ||
"name": "timexe", | ||
"version": "0.9.8", | ||
"version": "0.9.9", | ||
"description": "Yet another cron clone – but this one is better :o) - new improved syntax – milliseconds resolution – both for node JS and browser", | ||
@@ -5,0 +5,0 @@ "main": "timexe.js", |
@@ -158,2 +158,5 @@ # Timexe - Timer and scheduler | ||
## Change log | ||
0.9.9 Minor bugfix. timexe.list made into a regular array. | ||
####Help | ||
@@ -160,0 +163,0 @@ Please don't hesitate to submit an issue on github! It's the only way to make it better. |
@@ -79,4 +79,4 @@ /*============================================================================*\ | ||
,["* !/2 -4 12-16",1400000000,1403776800 ,"Mutually exclusive flags",false] | ||
,["* * * * * 0",1420066799,1420066800,"Cascading carry",false] | ||
,["* * * * ",1400000000,1400000400,"Only Wildcards = every hour,",false] | ||
,["* * * * * 0",1420066799,1420063200,"Cascading carry",false] | ||
,["* * * * ",1400000000,1399996800,"Only Wildcards = every hour,",false] | ||
,["* * * * 12",1400000000,1400008320,"Wildcards with one fixed value",false] | ||
@@ -83,0 +83,0 @@ ,["**1 12",1400000000,1401624000,"Wildcards with two fixed value",false] |
@@ -89,3 +89,3 @@ /*============================================================================*\ | ||
timexe(<time expression>, <call back>, <parameter to call back>); | ||
timexe(<time expression>, <command>, <parameter to call back>); | ||
@@ -112,4 +112,4 @@ Add a single shot or reoccurring job | ||
\*============================================================================*/ | ||
process.versions.timexe='0.9.7 - No late sundays'; | ||
/*============================================================================*\ | ||
@@ -130,3 +130,3 @@ Public functions | ||
// Globals | ||
timexe.list={}; | ||
timexe.list=[]; | ||
@@ -162,25 +162,16 @@ // Job object | ||
// Add to job entry to list; | ||
timexe.list[timexe.nextId]={}; | ||
timexe.list[timexe.nextId].timex=timex; | ||
timexe.list[timexe.nextId].action=action; | ||
timexe.list[timexe.nextId].param=param; | ||
var id = timexe.list.push({ | ||
timex: timex | ||
,action: action | ||
,param: param | ||
,timeoutShortened: false // Define the timeout Shortened flag | ||
}) -1; | ||
// Define the timeout Shortened flag | ||
timexe.list[timexe.nextId].timeoutShortened=false; | ||
// Start timed execution | ||
var error=timexe._start(timexe.nextId); | ||
var error=timexe._start(id); | ||
if(error.length>0) return {"result":"failed","error":error,"id":""}; | ||
// Add to static file | ||
if(typeof process === 'object' && timexe.file.length>0){ | ||
// Look for match in file | ||
// concatanate file.... | ||
} | ||
return {"result":"ok","error":"","id":timexe.nextId++}; | ||
return {"result":"ok","error":"","id":id}; | ||
} | ||
timexe.remove=function(id){ | ||
@@ -190,10 +181,5 @@ if(typeof timexe.list[id] !== "undefined"){ | ||
delete timexe.list[id]; | ||
// Delete from static file | ||
if(typeof process === 'object' && timexe.file.length>0){ | ||
// Look for match in file | ||
// splice file.... | ||
} | ||
return {"result":"ok","error":""}; | ||
} | ||
return; | ||
return {"result":"failed","error":"Timer ID was unknown"}; | ||
} | ||
@@ -243,4 +229,2 @@ | ||
if(typeof timexe.list[id]=== 'undefined') console.log("undef : ",id); | ||
// Set next execution time | ||
@@ -279,5 +263,4 @@ if(!timexe.list[id].timeoutShortened){ | ||
timexe.list[id].delay=delay; | ||
timexe.list[id].now=now; | ||
timexe.list[id].delay=delay; | ||
timexe.list[id].now=now; | ||
timexe.list[id].timer=setTimeout(timexe._run, delay, id); | ||
@@ -431,3 +414,3 @@ | ||
// Phase 2: Reassamble fields into object | ||
// Phase 2: Reassamble fields into a record | ||
//------------------------------------------------------------------------*/ | ||
@@ -434,0 +417,0 @@ var field=[]; field[0]={};field[0].val=[];field[0].range=[];field[0].flags=new String();; |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
8
168
42582
882