Hi,
I have the following lines (amongst others) in my config file for making a cronjob:
module: marktwacht
callback: marktwacht_check_opdracht
callback arguments: array('84','84')
pass job argument: TRUE
and the following function:
function marktwacht_check_opdracht($job, $args) {
...
}
When i run the cronjob I get the following error:
Too few arguments to function marktwacht_check_opdracht(), 1 passed and exactly 2 expected.
as you can see ive specified to pass the job argument and an extra argument (array). But for some reason it is not passed.
What am i doing wrong?
Kind regards,
Mark
Comment | File | Size | Author |
---|---|---|---|
#8 | ultimate_cron-callback-arguments-2909191-8.patch | 12.9 KB | e.bogatyrev |
|
Issue fork ultimate_cron-2909191
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #2
Mark aka Dark CreditAttribution: Mark aka Dark commentedComment #3
umed91 CreditAttribution: umed91 commented@mark were you able to get this working?
Comment #4
Murz@Mark can you describe where did you set
callback arguments
? I can't see such parameter inconfig/schema/ultimate_cron.schema.yml
file.Comment #5
e.bogatyrevHi everyone,
Please review the patch.
I suggest to use callback arguments as a string with line ending separation in the Cron Job configuration form since we don't actually know the final amount of them. It depends on the particular implementation of each callback. Then this string will be parsed, split to arguments and passed to callback.
Comment #8
e.bogatyrevComment #9
e.bogatyrevComment #10
nikolabintev CreditAttribution: nikolabintev at FFW commentedI just set it up on a project and it works well. I believe that this is e must-have feature.
Comment #11
nikolabintev CreditAttribution: nikolabintev at FFW commented