schedule.Test.js 538 B

123456789101112131415161718192021
  1. /**
  2. *
  3. * author: Sand
  4. * since: 2016/11/28
  5. */
  6. "use strict";
  7. let assert = require('assert');
  8. let Schedule = require('../../../../src/server/models/schedule/schedule');
  9. describe('Schedule API', function () {
  10. describe('When schedule job with 5 seconds', function () {
  11. it('should execute every 5 seconds', function () {
  12. let schedule = new Schedule();
  13. schedule.cronSchedule('5 * * * * *', function () {
  14. console.log('execute at: ' + new Date());
  15. });
  16. });
  17. });
  18. });