panel icon indicating copy to clipboard operation
panel copied to clipboard

Enhanced Scheduling with Conditional Task Execution in Pterodactyl

Open GGLinnk opened this issue 3 months ago • 4 comments

Is there an existing feature request for this?

  • [X] I have searched the existing issues before opening this feature request.

Describe the feature you would like to see.

Pterodactyl features a scheduling system resembling cron tasks, which operates based on real-time triggered events or intervals.

One drawback is the system's inability to initiate scheduled tasks if the host server starts after the specified time, limiting its effectiveness in certain scenarios. For example, this limitation could lead to missed task executions when the host server reboots beyond the scheduled timeframe. Like a server startup.

Describe the solution you'd like.

A new feature could be added to Pterodactyl to enable conditional scheduling, allowing users to set specific criteria for task execution. This would enhance planning capabilities by providing more flexibility and intelligence in automation workflows.

Additional context to this request.

No response

GGLinnk avatar Mar 15 '24 22:03 GGLinnk

Duplicate of #4160

Boy132 avatar Mar 16 '24 14:03 Boy132

Duplicate of #4160

No, not really, Unlike https://github.com/pterodactyl/panel/issues/4160, which suggests adding conditions to cron-based schedules, mine focuses on real-time permanent schedules. This difference is crucial as it addresses missed task executions due to delayed server startups. By introducing conditional scheduling for real-time checks, users gain better control over task execution, enhancing flexibility effectively.

It's not only about conditional but mainly about absolute planning that it's respected whenever the main server is started after or before the planned task.

I may have not explained correctly though. Sorry about that.

GGLinnk avatar Mar 16 '24 14:03 GGLinnk

To be able to shedule force wipe (on rust server) with special commands we need too be able to use [ "$(date +%m --date '7 days ago')" != "$(date +%m)" ]

0 19 * * 4 [ "$(date +%m --date '7 days ago')" != "$(date +%m)" ] &&

This job has a condition that checks if the month of the date 7 days ago is different from the current month, which will be true only on the first Thursday of the month.

Also same if it is a normal thursday. this is the only thing stopping me from doing more automations and make my life easier!

Zand3rsCode avatar May 02 '24 09:05 Zand3rsCode