Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replace hardcoded ***** with parameters #11

Open
El4a opened this issue Feb 16, 2016 · 0 comments
Open

Replace hardcoded ***** with parameters #11

El4a opened this issue Feb 16, 2016 · 0 comments

Comments

@El4a
Copy link

El4a commented Feb 16, 2016

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant