Scheduling "save all listers"

Hello,

I noticed that when my computer has any crash or problem, and I need to reboot it by force, DO loses the latest opened listers at the time, instead reverting to an earlier version (probably last proper shutdown one).
Is there a way automatically regularly backup the current opened listers so that in the event of a crash or anything, I still can go back to last opened ones?

Thanks

1 Like

I need that as well, there was a script somewhere here which accomplished an "auto save layout, when tabs/listers open/close", but I couldn't find it anymore. I tried a "script" tag and category "scripts/button" search, but to no avail.

DO is crashing from time to time, it is stable most of the time, but not 100%.. and then, there's me.. o) Recently I crashed the computer when connecting a drive.. I had a bad USB/power connector which caused a short. If you are sorting things in 3 dual listers with a dozen tabs open in each, it is an "arrrg"-moment when DO finally restarts in a totally different context/layout.

My feeling is, a continuous and native "save layout" option isn't a bad idea either.

One of this scripts?

1 Like

Thanks for finding these two.
How do you check if it's working, I've tried the second one but I'm not sure where it's saved nor where to check, and I don't want to crash my pc just to find out :slight_smile:

@Hardkorn
Yes thank you, but.. o)

The first one is an external app, I don't think this makes much sense and I surely will not create scheduled tasks on all the computers to auto save my current DO layout.

The second seem to only save when closing things, that does not help for crashing computer/processes.

I found another one:

But this one also only seems to save things when actively closing a lister or something.

I somewhere read a post from Leo, that auto saving the default listers/layout with a script, whenever listers and tabs open, will create problems the moment DO starts (e.g.). That could be solved I guess, by using DOs "OnStartup" event? Maybe we could use this to set a global variable, which stores DO startup time and in events like "OnTabOpen/Close" or "OnListerOpen/Close" we check if DO is at least 5 minutes alive before actually saving the current listers/layout?

@Leo What do you think, would that work? Anything else to pay attention to? I'm not sure what will happen when opening pre-saved layouts after DO has been started with this. I don't load/use separate layouts. Is there a lister variable or something, which indicates whether a lister is part of "default" or loaded layout? -> EDIT: Checked myself, there is! o) So we are set? o)

I can't think of any reason why it wouldn't work, although it might be fiddly to avoid saving the layout too often etc.

Ok, I did a prototype.. while writing and testing a bit, I noticed, I can only save a default lister, I can use
Prefs SETDEFAULTLISTER=quiet for that, but that does not seem to be correct, I think I need to save the current layout (with all the listers opened), just like how DO saves it when it exits regularly.

I tried the command below, but it opens a dialog, prompting for a layout name. Is there a layoutname for the layout DO saves for itself on exit? Could I pass this on somehow? Do we miss a piece to get this working?
Prefs LAYOUTSAVE=updatecurrent

Mhh, I did not get very far so far.. o) Thx!

I would just make it save to its own named layout, which you can restore after a restart if needed. Not perfect, but still gives you a safety net, and shouldn't be needed that often (if it is then something else is wrong that needs fixing!)

Ok, I initially did not want to save a dedicated layout and set it up in the startup prefs, but there is no other way right now if you want DO to reload your "last session" automatically. I still think it would make sense, if DO used it's own tools and would save a layout named "Last Session" or something when exiting. It would glue some things together and expose the layout concept more clear. It is there, why not use it where applicable?

Anyway, for anybody interested..
Here is a first version of the automatic layout saver - read script header for instructions:
Event.Generic_AutoSaveLayout.js.txt (17.2 KB) v0.1 2022-04-15

If things crash very often, it needs fixing for sure, but the situations where DO leaves me hanging are not easily reproducable and most of the time you are in the middle of doing things. In these situation you don't find much time and motivation to retry and file bug reports. I did that in the past and will do so for error situations that can be repeated, but if you ran DO for a full week and then it happens, what am I supposed to replay?

First successful recovery of my DO session happened right now after the computer crashed.
Since having installed MS-Teams on this rather fresh Win7 setup, the computer is broken! Don't install if you can avoid, it has serious issues with USB devices, especially if you use multiple cameras or microphones (on Win7 at least). System was stable for multiple month before installing Teams, now I crash + reboot every few days - a "nice" situation to test drive the automatic layout saver! o)

I actually don't mind DO crashing too much, it never left corrupted things behind (so far), it's just that I lose the context everytime, but this might be fixed now! o) There are other things in the program which drive me really mad, but these are offtopic here. o)

See and thank you! o)

3 Likes

You're exactly right on both counts!

Re. you script - do you have an updated version? How has it been working for you?

One idea I had was to also save a "tab group" since Opus loses those as well, but then instead of using the same name have a "Backup" folder in the tab groups and have a max of X items for each lister, for example,

  • "First Exit today"
  • "Last Exit today"
  • "First timed autosave today"
  • "Last timed autosave before today"
  • ...

Though as far as I understand your script doesn't do periodic saves, only hooks to various state changing events?

(I currently save tab groups on open/close, which helps on crashes and only a right-click away, though not as automatic)

Opus 13 has a built-in option to periodically save the open listers and tabs.

Thanks, I've enabled this with a more frequent backups timing after a few more losses, but the benefit of multiple snapshots is that it's also more resistant to user mistakes when you close too many tabs (especially since Dopus unfortunatley still doesn't have multiple undos/tab history)