App with background service, is possible? or something like that?

I need create a app that have to contain the following functionality:

Front end

Will render all products from store that also exist in WebAPI (i will do GET in my API based productId or other param), in table format with some columns, being one of them a checkbox whose value will be result of metadata from product.

If merchant click in checkbox, the product will updated (metadata)


(worker? / service? / job scheduler?.. i don’t know if this exists here in shopify, or something like that)

For Each product Y that haves checkbox with flag true

For Each X seconds

Call my WebAPI that returns the last update of product Z (name of the variable, example)

If this product Y.lastUpdate < Z.lastUpdate

Then Y.price = Z.price, Y.stock = Z.stock (etc) and update product Y in REST API

It’s is possible? Or exists other way to achieve this goal?