Adding custom parameters to jobs command

Help for integrating the Laravel package
Forum rules
Always add your Laravel, Aimeos and PHP version as well as your environment (Linux/Mac/Win)
Spam and unrelated posts will be removed immediately!
MaHo
Posts: 4
Joined: 24 Sep 2024, 08:03

Adding custom parameters to jobs command

Post by MaHo » 27 Sep 2024, 11:33

Laravel: v11.21.0
AImeos: 2024.07.2
PHP: 8.3.0
OS: Ubuntu 22.04.5

Hello,

I want to add some custom parameters to my jobs command for debugging, after some research and some trying i cannot find how to do this, is this at all possible?

For some context: i want to create a job that exports all orders to my clients administration software. To do some debug i would like to have te option to disable the actual file upload and be able to change the date range for the orders i want to export. In laravel i would do something like:

php artisan app:collect-orders {--date=} {--upload=true}

Is there something like this in the aimeos job interface? or do i have to create a laravel command, splitting my cronjobs over 2 standards and file locations?

User avatar
aimeos
Administrator
Posts: 8244
Joined: 01 Jan 1970, 00:00

Re: Adding custom parameters to jobs command

Post by aimeos » 27 Sep 2024, 11:43

The Artisan aimeos:jobs command currently doesn't support passing arbitrary options to the Aimeos job controllers. One possibility would be to add an "--option" parameter like the aimeos:setup command supports to set custom configuration:
https://github.com/aimeos/aimeos-larave ... nd.php#L30
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, Image give us a star

MaHo
Posts: 4
Joined: 24 Sep 2024, 08:03

Re: Adding custom parameters to jobs command

Post by MaHo » 27 Sep 2024, 12:31

I will look into it, thank you!

User avatar
aimeos
Administrator
Posts: 8244
Joined: 01 Jan 1970, 00:00

Re: Adding custom parameters to jobs command

Post by aimeos » 27 Sep 2024, 12:34

We will add that possibility to 2024.10 LTS :-)
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, Image give us a star

Post Reply