I'm searching for gui application which executes various tasks by users, handles errors (stop and notify, provide info what happened) and can be put into background.
- Can be executed by standard user without affecting other users. (So no server, no root, configuration in home dir.)
- Define a task as a set of steps. One step can be simple command (like "cp src dst") or something more elaborate (but generally, one Linux command can do pretty much everything, so it's sufficient). The important thing is that it's easy to define a step and later review whole task.
- Start a task which will then execute steps one-by-one. The gui can be hidden and re-opened any time, showing progress and log for each step.
- Notification when a step ends with an error. (Stop/pause the task after that.)
- Notification when task finishes.
- When system (the app or whole OS) crashes, the app displays all results which weren't confirmed by user (which means both finished tasks and tasks which were interrupted by the crash).
- Can be easily synchronized between devices (including an OS on external disk, so it's not running at the synchronization time) (so storing in some "big" SQL database (MariaDB, postgresql, couchbase, etc.) is no-go, while one or more sqlite files in ~/.config is OK).
I would love them but if the app lacks some of them, I can live with that.
- Variable definitions (extract data from step output, define variables as task input, etc.).
- One step can be another task.
- Support for conditions and loops, in best case supporting checking/iterating over files, lines in a text file, etc.
- Scheduling tasks. Either by time or when another task(s) is/are finished.
- Each step has two definitions: how to do it and how to revert it. So task can be executed normally or in reverse.
- Pause tasks (step granularity is enough - so it's paused after current step is finished or - optionally - interrupt the current step and redo it after unpaused) and resume later (including after OS restart).
- More elaborate failure detection: not only by exit value, but also parsing output / error output (regex, substring, ...).
What I tried
Generally does what I described, but:
- Every single script must be handled manually; error checking per-command (or using trap), logging, notifications, etc.
- It's hard to review later.
- When a step starts, there's no simply accessible overview where the script is, what finished. Checking logs of each step means either searching in one big log file or log each step separately (more coding per step).
- No simple list of currently started tasks and their status.
On first look, it seems like what I'm searching for.
- User app, no servers, no roots.
- List of many steps including working with window, system, etc. but at the same time allowing execution of simple commands.
- Support for variables, user input, notifications, etc.
- One task per file = simple synchronization (using Unison in my case), instead of synchronization of databases.
Bad sides (killer for me):
- Insufficient support for error checking; each step (action in the app) can react on error in only three ways: stop execution (without info where and why), ignore and goto line. The last one can be used to notify about what happened, but it must be handled for each step manually.
- Handling return code / error log of commands involves storing to a variable which means multiple steps to handle it (condition and reaction) - manually. It's actually easier to to this in bash.
Selenium is application for web testing, but the way how it's controlled is similar to what I'm searching for. If instead of downloading web pages it would execute commands (and few minor changes), it would be perfect.
What I'm actually trying to solve: when I use PC, I do various task (multimedia related, downloading and processing pages, development, etc.) and write lot's of bash scripts. For last few years, I feel it's uncomfortable - for example I execute a multimedia-related script, then decide I want to execute another after it's finished. But because I already started, I cannot write "first && second && third".
Also when I want to monitor what's running, I need to check each terminal manually. When I want to know when a task's finished, I need to either check each terminal manually, or not forget I need to add the notification to the script. Etc.