Trigger Jobs with REST API
Forum rules
Always add your Aimeos and PHP version as well as your environment (Linux/Mac/Win)
Spam and unrelated posts will be removed immediately!
Always add your Aimeos and PHP version as well as your environment (Linux/Mac/Win)
Spam and unrelated posts will be removed immediately!
-
- Posts: 2
- Joined: 01 Sep 2017, 14:20
Trigger Jobs with REST API
Hi,
first of all I have to admit that I'm absolutely new to Aimeos and I'm not very good at PHP. So sorry if this is a stupid question. I'm using 2017.07.4 (core) with Slim 3.8.1 and PHP 7.0 ...
I have to trigger the jobs through a REST API.
I've looked at and of cause I looked at . My idea was to do something like the method. The problem is that I can not get the required objects.
Any idea welcome
Regards,
Dirk
first of all I have to admit that I'm absolutely new to Aimeos and I'm not very good at PHP. So sorry if this is a stupid question. I'm using 2017.07.4 (core) with Slim 3.8.1 and PHP 7.0 ...
I have to trigger the jobs through a REST API.
I've looked at
Code: Select all
jobs.php
Code: Select all
\Aimeos\Slim\Command\Jobs
Code: Select all
\Aimeos\Slim\Command\Jobs::execute()
Any idea welcome
Regards,
Dirk
Re: Trigger Jobs with REST API
You will get into maximum execution time problems if you execute the jobs from a web environment. Instead, you should store the job requests in a file or the database and execute the jobs by a cronjob regularly depending on the stored requests.
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, give us a star
If you like Aimeos, give us a star
-
- Posts: 2
- Joined: 01 Sep 2017, 14:20
Re: Trigger Jobs with REST API
Maybe I missunderstand your answer.
But I can not execute cronjobs on the server. So I have to trigger them on a different way.
But I can not execute cronjobs on the server. So I have to trigger them on a different way.
Re: Trigger Jobs with REST API
You can copy the jobs.php file and remove the check for the CLI environment. But be careful to protect the new script by HTTP auth or something similar. Otherwise, everybody can execute all jobs.
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, give us a star
If you like Aimeos, give us a star