[Bug]: Crobjob with manual registering not working
⚠️ This issue respects the following points: ⚠️
- [X] This is a bug, not a question or a configuration/webserver/proxy issue.
- [X] This issue is not already reported on Github (I've searched it).
- [X] Nextcloud Server is up to date. See Maintenance and Release Schedule for supported versions.
- [X] Nextcloud Server is running on 64bit capable CPU, PHP and OS.
- [X] I agree to follow Nextcloud's Code of Conduct.
Bug description
I have registered the cronjob in my middleware and added it in my after controller method as
$this->jobList->add(SendInviteResponseMailJob::class, ['token' => $token]);
where token is a parameter
and i have done all my task in class SendInviteResponseMailJob extends QueuedJob
having 9 parameters but i get this error
ArgumentCountError: Too few arguments to function OCA\Calendar\BackgroundJob\SendInviteResponseMailJob::__construct(), 0 passed in /var/www/html/lib/private/BackgroundJob/JobList.php on line 281 and exactly 9 expected in /var/www/html/custom_apps/calendar/lib/BackgroundJob/SendInviteResponseMailJob.php:83 Stack trace: #0 /var/www/html/lib/private/BackgroundJob/JobList.php(281): OCA\Calendar\BackgroundJob\SendInviteResponseMailJob->__construct() #1 /var/www/html/lib/private/BackgroundJob/JobList.php(225): OC\BackgroundJob\JobList->buildJob(Array) #2 /var/www/html/cron.php(143): OC\BackgroundJob\JobList->getNext(false) #3 {main}
Steps to reproduce
1.register background job with parameter 2.create a background job file with all the code as needed 3.run cronjob and see error
Expected behavior
expected behavior is it should run smoothly without giving error.
Installation method
No response
Operating system
No response
PHP engine version
No response
Web server
No response
Database engine version
No response
Is this bug present after an update or on a fresh install?
No response
Are you using the Nextcloud Server Encryption module?
No response
What user-backends are you using?
- [ ] Default user-backend (database)
- [ ] LDAP/ Active Directory
- [ ] SSO - SAML
- [ ] Other
Configuration report
No response
List of activated Apps
Accessibility 1.10.0
Activity 2.16.0
Auto Delete 0.5.0 (my own app)
Brute-force settings 2.4.0
Circles 24.0.0
Collaborative tags 1.14.0
Comments 1.14.0
Contacts Interaction 1.5.0
Dashboard 7.4.0
Deleted files 1.14.0
Federation 1.14.0
File sharing 1.16.2
First run wizard 2.13.0
Log Reader 2.9.0
Monitoring 1.14.0
Nextcloud announcements 1.13.0
Notifications 2.12.0
Password policy 1.14.0
PDF viewer 2.5.0
Photos 1.6.0
Privacy 1.8.0
Recommendations 1.3.0
Right click 1.3.0
Share by mail 1.14.0
Support 1.7.0
Text 3.5.1
Theming 1.15.0
Update notification 1.14.0
Usage survey 1.12.0
User status 1.4.0
Versions 1.17.0
Video player 1.13.0
Weather status 1.4.0
Auditing / Logging 1.14.0
Default encryption module 2.12.0
External storage support 1.16.1
LDAP user and group backend 1.14.1
Nextcloud Signing status
No response
Nextcloud Logs
No response
Additional info
No response