You need to do this via Automation Studio. This is best practice for running queries as your current method is manual and does not tell you when the interaction is complete.
- Go to Automation Studio
- Select "Scheduled Automation"
- Select "Create a new automation"
- Drag and drop the query from the right hand panel onto the canvas
- Select the query you want to run
- On the 3 tab, you get to schedule the automation (determine its frequency)
- Click Save
This should work just fine for you. For this use case, there is no need to complex scripting / API triggers as the UI can handle it. For more information please visit: