Trying to create a service that will run every night at 23:59
At the moment it will save the call log for that day to a text file.
I have no idea about services and setting a repeating time.
What I have written appears to work but I feel it just keeps running as when I delete the file it creates it immediately replaces it.
Please use File - Export as zip when uploading projects.
Your scheduling code is incorrect. It will fire several times between 23:59:00 and the next day. You can add a flag that checks whether it already ran today and avoid sending more mails. Or you can correctly calculate the time for the next day. There should be several examples of that in the forum.