CubeCoders / AMP

Issue tracking and documentation for AMP
https://cubecoders.com/AMP
MIT License
207 stars 38 forks source link

Execute an arbitrary script as a triggered event (after-event, do Y) or scheduled task #167

Open gominecraft opened 5 years ago

gominecraft commented 5 years ago

Feature Request

Ability to run arbitrary script AFTER a given scheduled event is complete.

Feature Information:

This is not a module or app-specific feature.

Example Use-Case 1:

As a user, I want to schedule a backup. After that backup is complete, I want to trigger a script that will take that backup and do some work to it (shove it to a remote location, etc). I would like to be able to include argument (things that may only be known to AMP - eg, final backup filename)

Trigger After Backup Completed > Run Script : SomeScript

Example Use Case 2:

As a user, I want to be able to execute an arbitrary script on a scheduled basis that may or may not require arguments.

Example:

On Schedule every N minutes:

It shall be up to the owner / writer of the script to ensure it works without error / is safe. AMP

I confirm:

PhonicUK commented 5 years ago

Running scripts via the scheduler is something that I want to do, but making this secure in a way I'm happy with is going to be very difficult, so it's going to be a while.

gominecraft commented 5 years ago

I will admit, most of this desire comes from making backups offsite easier.

Without being able to (on linux) set a jail / each tmux session to run as a different user, I think it's an impossible task.

What may give you a huge win is offering to support (user installs/configures) tools like:

rsync, borgbackup, rclone, etc.

This would allow you to control the path of what gets backed up and not give the user the ability to backup all instances on that given host to abuse.

rsync and borgbackup would probably be the easiest to support.

PhonicUK commented 4 months ago

This is coming to Generic in a future update.

IceOfWraith commented 3 months ago

Why close it if it's not done though? 🤣

PhonicUK commented 3 months ago

I didn't actually mean to hit close, just reply xD