How do I update the GUI percentage completion value on a CRON task?

MrChips

Cadet
Joined
Aug 31, 2013
Messages
8
So this may be perceived as a little bit unimportant, but I'm a bit OCD about status notifications being accurate, timely and updated, so I figured it won't hurt to ask anyway...

I have a couple of cron jobs that I set up to run via the TrueNAS SCALE GUI (System Settings -> Advanced -> Cron Jobs). These jobs are shell scripts. They are running just fine and I get email notifications and all the usual bells and whistles are working great. Sometimes these jobs run for a few hours, and I noticed that when they are running the Web GUI "Task Manager" always shows them as "10% completed" (see screenshot below for example) until such time as the finish.

So, my question:

Is there a way for my shell scripts that execute these jobs to signal progress percentages back to the TrueNAS SCALE Web GUI?

Example Screenshot:

2022-11-01_121243.png

(Please ignore the "15 failed"... It was during a debugging session that I realized the question I pose above. :cool:)

Thanks ahead of time for any assistance you can provide!
 

HoneyBadger

actually does care
Administrator
Moderator
iXsystems
Joined
Feb 6, 2014
Messages
5,112
Good question!

I poked through the SCALE API docs; perhaps I'm not searching the correct keywords, but I couldn't find anything that lets you update the status of a currently running task. Creating, deleting, and updating the tasks themselves, absolutely; but not the feature you're asking for (which in my mind would definitely be a useful addition.)

Unless someone knows of this offhand, the best method to submit this request would be to use the "Report a Bug" link at the top of the page:


And create this as a feature request/enhancement.
 

MrChips

Cadet
Joined
Aug 31, 2013
Messages
8
Thanks HoneyBadger! I will definitely report it as an enhancement request.
 
Top