Here is another snippet which saves all open notebooks on a regular time interval.
The best place for it is your init.m file.
1) Use Notebooks[] to get a list of currently open notebooks.
2) Use Extract to filter (hgo) the ones we want ( every notebook except the Messages WIndow)
3) Use NotebookSave /@ to save them
4) Use SessionSubmit to cause this to happen at a given interval
Off[Rule::argr]; (* Suppress an annoying message. A better way would be a more specific filter *)
savePeriod=Quantity[300,"Seconds"];
obj=ScheduledTask[
hgo[aza_] :=And[ aza["DocumentType"]=="Notebook" , aza["WindowTitle"]!="Messages"] ;
NotebookSave/@ Extract[Notebooks[],Position[ Association/@NotebookInformation /@Notebooks[],_?hgo] ] ,savePeriod]//SessionSubmit ;