2017-05-08 90 views

回答

1
I don't know if there is any library for it or not. 

But you can simply implement it using simple date functions. 

var date=new Date("2017-05-09T01:30:00.123Z"); 

var mins=date.getMinutes(); 
//mins variable for the 1st * and so on 
var secs=date.getSeconds(); 

var dayofmonth=date.getDate(); 

var month=date.getMonth(); 

var dayofweek=date.getDay(); 

You can then build a string and use those values in the cron module. 
相关问题