As an example, take the phpsessionclean schedule. The cron.d file for this looks like this:
09,39 * * * * root [ -x /usr/lib/php/sessionclean ] && if [ ! -d /run/systemd/system ]; then /usr/lib/php/sessionclean; fi
It's saying if systemd doesn't exist on the system run the script
If systemd does exist it doesn't run and the systemd timer runs instead. The
phpsessionclean.timer file looks like this:
[Unit] Description=Clean PHP session files every 30 mins [Timer] OnCalendar=*-*-* *:09,39:00 Persistent=true [Install] WantedBy=timers.target
I read about creating your own .timer files and creating an associated .service file containing the details of the script you're running, but in this case, and in the case of other .timer files installed by packages (such as certbot, apt etc.) there are no associated .service files. So, how do I infer what command is going to be executed when this timer runs?