As I understand, all the front-end components for a react based ethereum dapp are rendered from the point of view of the user's metamask default account. All the calls to constant functions in solidity to retrieve state variable values and render the relevant components to display to users, uses the user's account.
What I would like is to add a certain design to it:
an automated routine running in background (with no front-end components to display) which will assess the state variable value and execute a smart contract transaction only meant to be executed by owner.
This owner based transaction invocation routine needs to run perpetually in the background, in an automated fashion, and not just when there is a user having your website page opened in his/her browser.
As an example, in case of the voting dapp, I want to build a routine where once a certain number of votes have been put, or a certain time limit expired, the vote calculation routine should be executed automatically, and that too from the owner's address (since only owner has the privilege of counting votes and declaring winner).
Could you please elaborate how such routine can be implemented? Would I have to store the owner's keystore file at the server end for it? is it a safe strategy? Thanks.