-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathmain.js
29 lines (21 loc) · 819 Bytes
/
main.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
import { Meteor } from 'meteor/meteor';
import {Timer} from '../imports/api/tasks.js';
import {Table} from '../imports/api/tasks.js';
Meteor.startup(() => {
//counter value
// if (Timer.find().count() == 0) {
// Timer.insert( {number:1} ); //initialize count value 1
// }
//SyncedCron.start(); //call syncronization function
//SyncedCron.add({ //added with code 'meteor add percolate:synced-cron'
// name: 'Constantly update counter',
// schedule: function(parser) { //parser is a later.parse object
// return parser.text('every 5 sec'); //run function every second
// },
// job: function() {
// var record = Timer.findOne();
// var number = record.number;
// number += 1;
// return Timer.update({_id: record._id}, {$set: {number: number}});
// },
});