Skip to content

Add CLI Cron Job for Parcel Shop Import with Logging#121

Open
gadnis wants to merge 6 commits intoDPDBaltics:mainfrom
gadnis:feature-cli-cron-job
Open

Add CLI Cron Job for Parcel Shop Import with Logging#121
gadnis wants to merge 6 commits intoDPDBaltics:mainfrom
gadnis:feature-cli-cron-job

Conversation

@gadnis
Copy link
Copy Markdown

@gadnis gadnis commented Apr 26, 2025

The original cron job option, based on HTTP, could cause timeouts. This update introduces a new CLI controller for cron jobs, enabling long-running tasks to be executed directly on the server. This approach bypasses HTTP-related timeouts, such as those from Cloudflare's 60-second limit, ensuring smoother execution for time-intensive tasks.

@TLabutis
Copy link
Copy Markdown

Hello @gadnis,

Thank you for contributing.

We will inform our development team to review the suggested improvement.

@MarijusDilys
Copy link
Copy Markdown
Collaborator

MarijusDilys commented May 22, 2025

Hi @gadnis,

Thank you for your contribution. We noticed that similar functionality already exists in the front/CronJob.php controller. Could you please help us understand the reason for adding a separate controller instead of modifying the existing one?

@gadnis
Copy link
Copy Markdown
Author

gadnis commented May 25, 2025

Hi @MarijusDilys,

  1. The controller named "CronJob" fails to load when the ./cron.php file is called via the command line interface.

  2. A separate controller was added to handle CLI usage. Right now, it only handles cron job, but it can be extended in the future. However, I mistakenly named the file ./cron.php instead of ./cli.php.

  3. I also think part of the logic in the CronJob controller should be refactored into a service so it can be reused by both the CLI controller and the CronJob controller. I avoided doing this now to keep the pull request from becoming too complex.

@MarijusDilys MarijusDilys added enhancement New feature or request on hold Currently being evaluated by the DPD team labels Jun 4, 2025
@MarijusDilys
Copy link
Copy Markdown
Collaborator

Hello @gadnis,

Thanks a lot for taking the time to draft this pull request. We appreciate the effort and thought that went into it.

After discussing internally, we’ve concluded there isn’t sufficient demand for this enhancement right now. As a result, we won't be moving forward with it at this time.

Thanks again for the contribution, and please feel free to raise any questions or revisit this if usage circumstances change down the line!

--
Best regards,
Marijus

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request on hold Currently being evaluated by the DPD team

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants