Replies: 4 comments 1 reply
-
Generally no need to reinvent cron; a mojolicious command will have access to the application and minion and a cron task can easily run that. https://docs.mojolicious.org/Mojolicious/Guides/Cookbook#Adding-commands-to-Mojolicious |
Beta Was this translation helpful? Give feedback.
-
I usually add small Mojolicious commands that enqueue a Minion task for me (like this one). And then schedule the command to be executed with systemd timers. |
Beta Was this translation helpful? Give feedback.
-
Same approach here as @kraih really. Have commands that enqueue and systemd timers that trigger those. Super simple and effective. I also take care to split any job I can into smaller / multiple tasks with dependencies between them. So instead of one monster-job it would look like this:
This makes it a great deal easier to handle retries of failed actions and basically limit the effects of partial failures during batch procesing. |
Beta Was this translation helpful? Give feedback.
-
Thanks all, it becomes to appear clearer now. |
Beta Was this translation helpful? Give feedback.
-
I'm not sure if minions can help me here, but I have an application that harvest data from different sources and requires a long time to complete (25+ hours). In order to make sure the application completes, I've created a batch operational mode and I scheduled via
cron
the repeated execution, so that the application can check at which point it stopped last time and restart from there.I'm thinking to convert this to a minion based approach, but I'm not sure if this is the right scenario. My idea is to:
Is it worth? Any idea about how to use minions to run scheduled repeated tasks?
Beta Was this translation helpful? Give feedback.
All reactions