Scheduled tasks #997
Replies: 4 comments 4 replies
-
Personally, I think that using cron would be ideal. PufferPanel could use libraries such as https://github.com/robfig/cron to schedule the tasks that users would have saved themselves, so users would not have to use crontab directly. Anyway, how do you want to schedule the tasks? |
Beta Was this translation helpful? Give feedback.
-
cron based scheduling expressions, be they executed by the PufferPanel service or through cron itself, doesn't sound like a big issue to me, cron expressions aren't super complex so I think it should be possible to rig up a frontend component to do exactly that (API use in my opinion doesn't need to be as careful about users with little to no technical background as I doubt such users will make much direct use of the API due to that being a rather technical thing as well), though if there are other solid options available that are easier to configure (for users and software) I would tend towards those too It would probably be a good idea to support running more than one operation on a single task (just saying in case that's not already the plan) as e.g. backup routines not rarely need more than one thing to happen (example minecraft: send command to console to stop saving world to disk, copy world, send another command to reenable saving to disk) I'd imagine a tasks steps being similar to the operations already used in templates but have 2 such options, one for sending a command to console and one to run an operation as used in templates (that or just have an additional operation for sending to the console that's only available for these tasks, though I don't know if golangs type system can actually handle such a thing and have a gut feeling it probably can't, then again, I have very little experience with golang, so I might be completely wrong here) |
Beta Was this translation helpful? Give feedback.
-
Hmm, can probably store tasks as part of a servers |
Beta Was this translation helpful? Give feedback.
-
any progress on this? |
Beta Was this translation helpful? Give feedback.
-
I have appetite to implement scheduled tasks but little appetite to design the interface behind them and want to crowd source sensible ideas.
Personal design goals:
I think we can handle most use cases by slapping on something (not cron) on top of operations.
For a first implementation, modelling this in the database is easy likely a new table with
serverid, operatation, args
.The biggest thing I'd like to see discussion on is how you model what the user see and what you use to specify when it will run, I will strongly advocate away from anything cron styled because its unusable for non technical people.
Beta Was this translation helpful? Give feedback.
All reactions