Skip to content

Logs to stdout on scheduler run in background as ->runInBackground()->sendOutputTo('/dev/stdout') are not logged into aws logs #50085

Answered by ghost
ghost asked this question in Q&A
Discussion options

You must be logged in to vote

SOLUTION WITH queue

        Schedule::macro(
            'execCustomEvent',
            /**
             * Add a new command event to the schedule.
             * @see \Illuminate\Console\Scheduling\Schedule::exec
             */
            function (string $command, array $parameters = []): Event {
                //** @var Schedule $this */
                if ([] !== $parameters) {
                    $command .= ' ' . $this->compileParameters($parameters);
                }

                $this->events[] = $event = new class ($this->eventMutex, $command, $this->timezone) extends Event {
                    /**
                     * @inheritDoc
                     */

Replies: 7 comments 5 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
1 reply
@ghost
Comment options

Comment options

You must be logged in to vote
0 replies
Answer selected
Comment options

You must be logged in to vote
4 replies
@ghost
Comment options

@rburgst
Comment options

@ghost
Comment options

@ghost
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
1 participant