mirror of https://gitgud.io/fatchan/jschan.git
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
11 lines
388 B
11 lines
388 B
'use strict';
|
|
|
|
const fs = require('fs-extra')
|
|
, Schedule = require(__dirname+'/../Schedule.js');
|
|
|
|
fs.readdirSync(__dirname).forEach(file => {
|
|
if (file === 'index.js') { return; }
|
|
const name = file.substring(0, file.length-3);
|
|
const { func, interval, immediate, condition } = require(__dirname+'/'+file);
|
|
module.exports[name] = new Schedule(func, interval, immediate, condition);
|
|
});
|
|
|