cron-cluster's People
Forkers
germanf iflix snydsoft marcus433 yuyang860521 kidikudazi ssut adroaldopagliari chavee jonathanroze dimonpvt1236cron-cluster's Issues
fake timer
Test timer must be faked for faster test running
using sinon.js: http://sinonjs.org/
{
setUp: function () {
this.clock = sinon.useFakeTimers();
},
tearDown: function () {
this.clock.restore();
},
"test should animate element over 500ms" : function(){
var el = jQuery("<div></div>");
el.appendTo(document.body);
el.animate({ height: "200px", width: "200px" });
this.clock.tick(510);
assertEquals("200px", el.css("height"));
assertEquals("200px", el.css("width"));
}
}
Redis issue
Hi: @Natsuke
I'm using latest redis version, when pass redis client to cron-cluster I got this
Err wrong number of arguments for set command.
This my code
var client = require("redis").createClient();
var CronJob = require('cron-cluster')(client).CronJob
var job = new CronJob('* * * * * *', function () {
console.log("here timer");
})
job.start()
May someone help me with that. tks
How to get list cron, add, remove cron when run time
I want write gui for management list cron
Feature:
- List cron
- add cron
- remove cron
- update cron (option)
CronJob executes function on all instances - FIXED IN PR #5
There is a bug when you are using an object as first parameter of the CronJob instance, like this:
`js
var redis = require('redis').createClient()
var CronJob = require('cron-cluster')(redis).CronJob
function doCron () {
var job = new CronJob({
cronTime: '* * * * * *',
onTick: function () {
// Do some stuff here
}
})
job.start()
}
`
this will create an instance of our application which is not synchronized with the other ones in the cluster.
Bugfix is available here: #5
Modern Alternative?
First of all, thanks for your work on this package, cool that something like this exists! ๐
Considering that this library hasn't received any new commits or publishes in the last 4 years, would you suggest a modern alternative?
Looking at comparison of competing libraries on npm trends, some more low-level alternatives like async-mutex
, async-lock
and mutexify
are suggested.
This seems to be a similar approach to this Stack Overflow answer
Would you suggest using one of these alternatives? Or some different approach?
Remove deprecated lodash.wrap dependency
Per lodash/lodash#3744 (comment), the modularized lodash
packages are deprecated. Let's use lodash/wrap
instead of lodash.wrap
!
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.