I have created a ServiceName.service file.
[Unit] Description=ServiceName Service After=network.target [Service] ExecStart=/usr/local/bin/<scriptName>.sh
And I have create a ServiceName.timer file.
[Unit] Description=ServiceName timer to start weekly [Timer] #reboot OnBootSec=1min #weekly OnUnitActiveSec=1w Unit=ServiceName.service [Install] WantedBy=multi-user.target
The .sh file starts a webpage and a search with new results for the webpage that needs to be accessible for a week, and then perform a new search.
The scripts starts on boot, so that part works. But it seems that the script has to shutdown the service first before the timer function works. I have no clue on how to do that.