How difficult would this setup be with octoprint?

I am not very familiar with the software, but it looks pretty versatile. Here's the workflow

(part I'm confident is possible)
A computer is loaded with .gcode files. The user selects .gcode files and uploads them to Octoprint. OctoPrint Print Queue cycles through the files, printing then clearing the build plate.

(part I'm unsure about)
If there are no files queued up in OctoPrint, the machine executes an idling .gcode script, where it prints filler objects. After completing the filler print, it checks for a new upload to queue. If there is one, it runs that- if nothing, it runs the script again, checks again, etc.

Can certainly be done with a plugin but there's nothing built in for that.