Scheduled Tasks Processing but not showing in admin_process_manager

General discussions around KeyHelp.
Post Reply
helping_hands1
Posts: 9
Joined: Wed 24. Feb 2021, 14:56

Scheduled Tasks Processing but not showing in admin_process_manager

Post by helping_hands1 »

Regarding task:

Command: nohup php PATH/artisan queue:work --daemon &
Schedule: After server reboot
Owner: redacted (non-root user)


I've scheduled above task, for first time to run, I clicked on Run now from actions. After server reboot, the task message is showing Status: Processing but inside process manager I cannot see the process. So I again click on Run Now from action.
Now it showing two messages but in process manager only one process is running.

Image

I clicked on "Click here to remove all pending and finished tasks at once." but still showing this messages.
User avatar
24unix
Posts: 1560
Joined: Sun 21. Jun 2020, 17:16
Location: Kollmar
Contact:

Re: Scheduled Tasks Processing but not showing in admin_process_manager

Post by 24unix »

helping_hands1 wrote: Sat 3. Jun 2023, 19:05 Regarding task:

Command: nohup php PATH/artisan queue:work --daemon &
Schedule: After server reboot
Owner: redacted (non-root user)
Why do you use nohup?
Are you in fear that the local shell loses connection to the host? :)

And: Remove the ampersand, that sends the process to the background. Probably not what the scheduler expects.

Edit: nohup was a workaround for unreliable dialup connections, later replaced by screen and even later tmux.

In a local environment you don't need it.
mfg Micha
--
If Bill Gates had a nickel for every time Windows crashed …
… oh wait, he does.
helping_hands1
Posts: 9
Joined: Wed 24. Feb 2021, 14:56

Re: Scheduled Tasks Processing but not showing in admin_process_manager

Post by helping_hands1 »

Hi,
Thanks for your reply.

But I have to run that task at background that's why I used &.
User avatar
24unix
Posts: 1560
Joined: Sun 21. Jun 2020, 17:16
Location: Kollmar
Contact:

Re: Scheduled Tasks Processing but not showing in admin_process_manager

Post by 24unix »

helping_hands1 wrote: Wed 7. Jun 2023, 18:24 Hi,
Thanks for your reply.

But I have to run that task at background that's why I used &.
As I can't glimpse through the code, i just can guess: Scheduled task might always be running in the background.

Did you try it without the ampersand?

None of my background tasks scheduled via keyHelp have the ampersand.
mfg Micha
--
If Bill Gates had a nickel for every time Windows crashed …
… oh wait, he does.
Post Reply