Using jobs within a package
Permalink
I've seen that I can create a job within my own package. That's nice, I think it wasn't always like that..
However, I can't find the proper method to access it. getByID simply ignores the package which might return the wrong job in case you have two jobs with the same handle in two packages..
Did I miss something?
However, I can't find the proper method to access it. getByID simply ignores the package which might return the wrong job in case you have two jobs with the same handle in two packages..
Did I miss something?
e.g.
if your package is "my_package" and your job is "Clean Stuff" just give it the handle "my_package_clean_stuff" and reference it as
$j = Job::getByHandle('my_package_clean_stuff');
Also - most of the time you won't need to call the job yourself - you can just install it and let the admins choose when/how to run it.