Files: c5c7a8ffadbd51aa28a5f3f096fe43f69405da44 / test / test-79-npm / cron / cron.js
293 bytesRaw
1 | ; |
2 | |
3 | var CronJob = require('cron').CronJob; |
4 | |
5 | var counter = 0; |
6 | |
7 | new CronJob('* * * * * *', function () { // eslint-disable-line no-new |
8 | counter += 1; |
9 | }, null, true, 'America/Los_Angeles'); |
10 | |
11 | setTimeout(function () { |
12 | if (counter === 4) console.log('ok'); |
13 | process.exit(); |
14 | }, 4500); |
15 |
Built with git-ssb-web