Skip to content

Scheduler Task throws Error when executed via CLI Command #13

@schluchzi

Description

@schluchzi

I installed the extension in TYPO3 v13. There, I created the scheduler task “Mail Sender: Validate All Addresses.”
When I run the task manually via the backend, everything works without any issues.
But as soon as the task is run via a cron job, the system encounters the following error

[ERROR] No request given. ConfigurationManager has not been initialized properly.

Exception in scheduler task #5 (Mail Sender: Validate All Addresses)

Class: Hn\MailSender\Task\ValidateSenderAddressesTask

From what I’ve analyzed so far, this is because the ConfigurationManager is used in the “loadAllFormDefinitionsV13” function. The ConfigurationManager works with the current request, which (according to the TYPO3 documentation https://docs.typo3.org/permalink/t3coreapi:typo3-request-console-command) is not available in the CLI context.

Kind regards,
Luca

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions