I've written a very simple command line programme that uses mysqldump to dump data at a specified interval.  
 I wanted it to be running after I run the programme and I disconnect putty ssh connection.  

But as soon as I exit the ssh connection, the programme shuts down.  

I think I can make my programme run even after I disconnected from the ssh by using daemon threads but I'm worried about not being able to find and stop unnecessary duplicate daemon threads.  

The scenario I'm decribing is...  

1. I log into the server using putty.  

2. Turn on the auto backup programme.  

3. I exit the putty connection.  

---the daemon is running  

4. Hopefully, when I log into the server again, I have a way to stop the auto backup programme if needed.  

Cron jobs and DBMS specific methods are out of my options.  
 I'd like to learn how to do the job described above and use it where ever the situation fits not just database backup.

Any good ideas ? : )