Best practice scripting on UNRAID? Language?


supergregg

Recommended Posts

Hi.
I'm a bit new to the linux scene, coming from a very microsoft based workplace. I have been running unraid for a couple of months now and I'm slowly moving away from my Windows VM to docker containers.
Right now I'm stuck at replacing a PowerShell script. The script checks for a JSON auth-token, runs a couple of Rest-API queries, re formats results and Inserts them into a MariaDB database, close and repeat every 5 min.


So the question is, and I'm thinking this might be a hot debate, but what would be the best approach to converting this to running natively on UNRAID in some form?

BASH? Python? Installing PowerShell? User Script Plugin? How do I make it run every 5 min?

Thanks in advance!
 

Link to comment

My personal preference for scripting on Unraid is PHP.  It is built into Unraid as it is widely used behind the GUI to support server-side actions but is a full blown programming language so can do almost anything you can think of and I find it much easier to use than something like bash.

 

In term of scheduling then the User Scripts plugin allows you to specify virtually any frequency you like if you use the 'Custom' option.

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.