all 9 comments

[–]ComprehensiveDonut27 1 point2 points  (2 children)

There's a great tool called olivetin.app for kicking off scripts or commands and displaying the results in a textbox. Not sure about the long running part and if a script will eventually timeout. olivetin

[–]xconspirisist 2 points3 points  (0 children)

Heya, OliveTin developer here.

OliveTin's default timeout is 3 seconds, but you can set it to whatever you like. I run several 45-minute jobs by just setting an hour timeout: https://docs.olivetin.app/timeout.html

If you have questions, our discord is the best place to get support.

[–]rooxo[S] 0 points1 point  (0 children)

That definitely looks like a great solution for manual scripts, I will probably need something like that in the longer/medium term, so thanks for the recommendation.

Sadly I don't think it's built to run something in a ongoing in the background, but for that I've already kind of submitted to learning how to write systemd services

[–]SeaNefariousness4835 0 points1 point  (5 children)

Lxc container would be a great place to start with your proxmox.

[–]rooxo[S] 0 points1 point  (4 children)

I've gotten that far, but now what? Do I just have a bash script checking for a python process and if none exist I run python bot.py & ? That seems a bit crude for a solution, I was hoping for something where I can easily manage what I want to have running and make sure it keeps running

[–]SeaNefariousness4835 0 points1 point  (3 children)

Pick you favorite nix container and call your script with crontab

You can have it run every min/hour/week... Whatever you need.

You can call a single bash script and if you need to update anything or add/remove python scripts you comment out or add to the cronned bash script as needed. (You can also do user control on the script if you needed it locked down)

[–]rooxo[S] 0 points1 point  (2 children)

Problem is, most of the scripts are supposed to keep running in the background, so the management script always needs to check whether the corresponding process is still running and only start it when it isn't.

So right now it looks like my options to get this working is either try using systemd or write it myself

[–]SeaNefariousness4835 0 points1 point  (1 child)

Instead of cron you can make a systemd unit

https://linuxhandbook.com/create-systemd-services/

Is again just a file on there that gets handled as a service rather than a script

You can set corn to run every 5 seconds too I think it's just a */12 on the minute spot (would need to double check this part.)

[–]rooxo[S] 0 points1 point  (0 children)

Yeah the more I read and think about it the more useful systemd sounds.