verful / adonis-scheduler

Easily manage cron tasks in AdonisJS
MIT License
52 stars 5 forks source link

Closing (working in background scheduler) if any #88

Closed omer73364 closed 3 months ago

omer73364 commented 3 months ago

How to close the scheduler from background, or restart it if possible?

arthur-er commented 3 months ago

The scheduler always is in foreground when you run the node ace scheduler:work command, to restart simply stop and start again

omer73364 commented 3 months ago

No, I run it in the ssh terminal of my server in the background.. Then when I connect to ssh again.. I can't stop it easily I keep the pid of scheduler process so I can stop it only by killing it using its pid

arthur-er commented 3 months ago

Run it as a systemd service, if you don't have access to systemd or any service manager, use pm2

omer73364 commented 3 months ago

Run it as a systemd service

OK, I will try this.. Thank you

alessandrodias commented 3 months ago

Can you please provide an example of how can I run this alongside with my server, using PM2?

arthur-er commented 3 months ago

Can you please provide an example of how can I run this alongside with my server, using PM2?

https://chatgpt.com/share/2611cb97-aab2-4780-93f5-105f82c8311c