meteor.cron's People
Forkers
laboratorymeteor.cron's Issues
Example Not Working
This is my code:
var hello = function() {
console.log("WORLD");
}
var cron = new Meteor.Cron({
events: {
"0 * * * *": hello()
}
});
In my browser console it prints "WORLD" just once then I get an error of Uncaught TypeError: undefined is not a function
Only basic crontab syntax works
It would be great if the documentation would reflect that typical crontab entries with comma seperated values, ranges or -notation do not work with this implementation.
For example */15 4-16 * * 6,7
is valid crontab syntax. (Every 15 minutes between 4 AM and 4 PM on saturdays and sundays.) It doesn't work with the implementation though.
TypeError: Property 'func' of object [object Object] is not a function
I20160127-05:40:00.366(2)? Exception in setInterval callback: TypeError: Property 'func' of object [object Object] is not a function
I20160127-05:40:00.366(2)? at Cron.Meteor.Cron.Cron.doEvent (packages/mrt_cron/packages/mrt_cron.js:90:1)
I20160127-05:40:00.367(2)? at Cron.Meteor.Cron.Cron.do (packages/mrt_cron/packages/mrt_cron.js:102:1)
I20160127-05:40:00.367(2)? at packages/mrt_cron/packages/mrt_cron.js:66:1
I20160127-05:40:00.367(2)? at [object Object]._.extend.withValue (packages/meteor/dynamics_nodejs.js:56:1)
I20160127-05:40:00.367(2)? at packages/meteor/timers.js:6:1
I20160127-05:40:00.367(2)? at runWithEnvironment (packages/meteor/dynamics_nodejs.js:110:1)
Still maintained?
No updates in two years. I had listed this package at http://stackoverflow.com/questions/11703010/background-tasks-in-meteor/21351966#21351966 but it might be better to remove it if it's no longer maintained.
Schedule Based on Dates
Hello,
Can this handle dates - Schedule function to run at a specific date in the future
why run double world function
var world = function () {
console.log('World!');
}
var cron = new Meteor.Cron( {
events:{
"* * * * *" : world
}
});
Is the code example correct?
I was having a hard time creating a new Cron object following this example code:
var world= function (){
console.log('World!');
}
var myBirthDay= function (){
console.log('my Birth Day!');
}
var crone = new Meteor.Cron{
events:{
"* * * * *": "world",
"0 0 18 6 *":"myBirthDay"
}
}
Meteor.Cron{...}
was giving me an error, so I tried wrapping everything in parenthesis. Also, I was getting TypeError: Property 'func' of object #<Object> is not a function
in each of the events. I had to not pass strings, but the functions themselves. The resulting code is:
var world= function (){
console.log('World!');
}
var myBirthDay= function (){
console.log('my Birth Day!');
}
var crone = new Meteor.Cron({
events:{
"* * * * *": world,
"0 0 18 6 *": myBirthDay
}
});
Am I correct, or am I missing something? Great package, thanks!
Replace hardcoded ***** with parameters
Is it possible to pass args to a function and replace '* * * * *' with those arguments? I'm trying
`var day = '';
var month = '';
var hour = '';
var min = '';
//these values will ultimately be something else obviously
function doJob(day, month, hour, min) {
var time = '' + min + ' ' + hour + ' ' + day + ' ' + month + ' *';
var cron = new Meteor.Cron({
events:{
time : test
}
});
return cron;
}`
but this doesn't work unfortunately. No errors, just no response from the cronjob i.e. it doesn't do anything.
Update for Meteor 0.9
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. ๐๐๐
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google โค๏ธ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.