You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I know there is this issue, but I feel that a better job could be done with this.
Instead of setting context (which would make this.stop() be unavailable), why not add another property to the CronJob object - params?
Example:
varmyParams={myText: 'this params could be any JSON'};varjob=newCronJob({cronTime: '00 30 11 * * 1-5',params: myParams,onTick: function(p){console.log(p.myText);},start: false,timeZone: 'America/Los_Angeles'});
The text was updated successfully, but these errors were encountered:
I know there is this issue, but I feel that a better job could be done with this.
Instead of setting context (which would make
this.stop()
be unavailable), why not add another property to theCronJob
object -params
?Example:
The text was updated successfully, but these errors were encountered: