Here's the timer vsftpd-restart.timer
[Unit]
Description=Restart vsftpd daily at 6 AM
After=network.target
[Timer]
Unit=vsftpd-restart.service
OnCalendar=*-*-* 06:00:00
Persistent=true
[Install]
WantedBy=timers.target
This is the script vsftpd-restart.service
[Unit]
Description=Restart vsftpd daily at 6 AM
After=network.target
[Service]
Type=oneshot
ExecStart=/bin/bash -c 'systemctl stop vsftpd; systemctl start vsftpd'
[Install]
WantedBy=vsftpd-restart.timer
And here's the vsftpd systemctl log
Oct 07 06:00:01 test systemd[1]: Stopping vsftpd.service - vsftpd FTP server...
Oct 07 06:00:01 test systemd[1]: vsftpd.service: Deactivated successfully.
Oct 07 06:00:01 test systemd[1]: Stopped vsftpd.service - vsftpd FTP server.
Oct 07 06:00:01 test systemd[1]: Starting vsftpd.service - vsftpd FTP server...
Oct 07 06:00:01 test systemd[1]: Started vsftpd.service - vsftpd FTP server.
Oct 07 06:01:01 test systemd[1]: Stopping vsftpd.service - vsftpd FTP server...
Oct 07 06:01:01 test systemd[1]: vsftpd.service: Deactivated successfully.
Oct 07 06:01:01 test systemd[1]: Stopped vsftpd.service - vsftpd FTP server.
Oct 07 06:01:01 test systemd[1]: Starting vsftpd.service - vsftpd FTP server...
Oct 07 06:01:01 test systemd[1]: Started vsftpd.service - vsftpd FTP server.
Oct 07 06:02:01 test systemd[1]: Stopping vsftpd.service - vsftpd FTP server...
Oct 07 06:02:01 test systemd[1]: vsftpd.service: Deactivated successfully.
Oct 07 06:02:01 test systemd[1]: Stopped vsftpd.service - vsftpd FTP server.
Oct 07 06:02:01 test systemd[1]: Starting vsftpd.service - vsftpd FTP server...
Oct 07 06:02:01 test systemd[1]: Started vsftpd.service - vsftpd FTP server.
Oct 07 06:03:01 test systemd[1]: Stopping vsftpd.service - vsftpd FTP server...
Oct 07 06:03:01 test systemd[1]: vsftpd.service: Deactivated successfully.
Oct 07 06:03:01 test systemd[1]: Stopped vsftpd.service - vsftpd FTP server.
Oct 07 06:03:01 test systemd[1]: Starting vsftpd.service - vsftpd FTP server...
Oct 07 06:03:02 test systemd[1]: Started vsftpd.service - vsftpd FTP server.
Oct 07 06:04:01 test systemd[1]: Stopping vsftpd.service - vsftpd FTP server...
Oct 07 06:04:01 test systemd[1]: vsftpd.service: Deactivated successfully.
Oct 07 06:04:01 test systemd[1]: Stopped vsftpd.service - vsftpd FTP server.
Oct 07 06:04:01 test systemd[1]: Starting vsftpd.service - vsftpd FTP server...
Oct 07 06:04:01 test systemd[1]: Started vsftpd.service - vsftpd FTP server.
Oct 07 06:05:01 test systemd[1]: Stopping vsftpd.service - vsftpd FTP server...
Oct 07 06:05:01 test systemd[1]: vsftpd.service: Deactivated successfully.
Oct 07 06:05:01 test systemd[1]: Stopped vsftpd.service - vsftpd FTP server.
Oct 07 06:05:01 test systemd[1]: Starting vsftpd.service - vsftpd FTP server...
Oct 07 06:05:01 test systemd[1]: Started vsftpd.service - vsftpd FTP server.
Oct 07 06:06:01 test systemd[1]: Stopping vsftpd.service - vsftpd FTP server...
Oct 07 06:06:01 test systemd[1]: vsftpd.service: Deactivated successfully.
Oct 07 06:06:01 test systemd[1]: Stopped vsftpd.service - vsftpd FTP server.
Oct 07 06:06:01 test systemd[1]: Starting vsftpd.service - vsftpd FTP server...
Oct 07 06:06:01 test systemd[1]: Started vsftpd.service - vsftpd FTP server.
Oct 07 06:07:01 test systemd[1]: Stopping vsftpd.service - vsftpd FTP server...
Oct 07 06:07:01 test systemd[1]: vsftpd.service: Deactivated successfully.
Oct 07 06:07:01 test systemd[1]: Stopped vsftpd.service - vsftpd FTP server.
Oct 07 06:07:01 test systemd[1]: Starting vsftpd.service - vsftpd FTP server...
Oct 07 06:07:01 test systemd[1]: Started vsftpd.service - vsftpd FTP server.
Oct 07 06:08:01 test systemd[1]: Stopping vsftpd.service - vsftpd FTP server...
Oct 07 06:08:01 test systemd[1]: vsftpd.service: Deactivated successfully.
Oct 07 06:08:01 test systemd[1]: Stopped vsftpd.service - vsftpd FTP server.
Oct 07 06:08:01 test systemd[1]: Starting vsftpd.service - vsftpd FTP server...
Oct 07 06:08:01 test systemd[1]: Started vsftpd.service - vsftpd FTP server.
Oct 07 06:09:01 test systemd[1]: Stopping vsftpd.service - vsftpd FTP server...
Oct 07 06:09:01 test systemd[1]: vsftpd.service: Deactivated successfully.
Oct 07 06:09:01 test systemd[1]: Stopped vsftpd.service - vsftpd FTP server.
Oct 07 06:09:01 test systemd[1]: Starting vsftpd.service - vsftpd FTP server...
Oct 07 06:09:01 test systemd[1]: Started vsftpd.service - vsftpd FTP server.
Oct 07 06:10:01 test systemd[1]: Stopping vsftpd.service - vsftpd FTP server...
Oct 07 06:10:01 test systemd[1]: vsftpd.service: Deactivated successfully.