AMP icon indicating copy to clipboard operation
AMP copied to clipboard

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

Open gominecraft opened this issue 6 years ago • 5 comments

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:

  • Run SomeScript
    • With (or without) arguments

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

I confirm:

  • [X ] that I have searched for an existing feature request matching the description.

gominecraft avatar Oct 11 '19 19:10 gominecraft

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.

PhonicUK avatar Oct 14 '19 21:10 PhonicUK

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.

gominecraft avatar Oct 14 '19 22:10 gominecraft

This is coming to Generic in a future update.

PhonicUK avatar Jul 31 '24 10:07 PhonicUK

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

IceOfWraith avatar Jul 31 '24 23:07 IceOfWraith

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

PhonicUK avatar Aug 01 '24 19:08 PhonicUK