Automation to loop through items

Is there a way to loop through all items in automation?

For example

at midnight every day, delete any item marked as done
at noon every Monday, any item that is older than 1 week add a tag
when a button is clicked, move anything with tag X to column Y

etc.