Example - Here is a reusable systemd timer template that will run a script on a schedule under a specific user id
I recently moved to Arch (EndeavourOS) from Mint. Arch doesn't have cron installed as it uses systemd timers instead, and while I could have just installed cron that felt like a lazy answer.
Systemd timers are easy enough to use and I got it working straight away, but I bumped into a comment in the Arch wiki about using a template for the timer so it can be re-used. I'm a bit slow, so I spent a hours trying to work this out, but I couldn't find a good example. Anyway, I now have it working so I thought it would be useful for someone in the future for easy reference .
This is how you create a timer template that can be reused to run a oneshot service under a specific user. In this example it will run on the hour every hour.
Create the timer file.
sudo nano /etc/systemd/system/everyhour@.timer
Paste the following into that file, save and close.
You could make a scripts that takes an argument, and that script executes all scripts in the folder provided as the argument. Then make 4 triggers that call this script with different folders as the argument. You could call these triggers something like hourly, daily, weekly and monthly.