Create a daily cron.
While editing the trim file add the fstrim command to the file.
sudo fstrim -v / >> /dev/null 2>&1
Once you've added your SSD partitions, save the file and make it executable using the following command:
sudo chmod +x /etc/cron.daily/trim
Ubuntu executes the daily cron at around 06:25 (if the computer is turned on)