Is there a way to save every X minutes?

8 views
Skip to first unread message

M)

unread,
Jun 29, 2009, 8:47:05 AM6/29/09
to TiddlyWiki
I have a couple of TW addons that do things in the background, which
doesn't trigger the autosave. Is there a way to save TW every 10
minutes or so?

FND

unread,
Jun 29, 2009, 1:39:41 PM6/29/09
to Tiddl...@googlegroups.com
> I have a couple of TW addons that do things in the background, which
> doesn't trigger the autosave. Is there a way to save TW every 10
> minutes or so?

Quite a while ago I wrote these:
http://fnd.lewcid.org/svn/TiddlyWiki/plugins/PeriodicUploadsMacro.js
http://fnd.lewcid.org/svn/TiddlyWiki/plugins/PeriodicUploadsPlugin.js

Shouldn't be hard to make them call saveChanges instead of triggering an
upload.


-- F.

M)

unread,
Jun 29, 2009, 2:33:38 PM6/29/09
to TiddlyWiki
The plugin is what I am after because it works upon load of the TW.
Unfortunately, I can't get it to work (I'm not script literate). I
did get the macro to work by replacing config.macros.upload.action
(this.params) with saveChanges() so I must be on the right track.
What am I missing?

If the macro can begin working on load, what do needs changing?

FND

unread,
Jun 29, 2009, 3:56:07 PM6/29/09
to Tiddl...@googlegroups.com
> I did get the macro to work by replacing
> config.macros.upload.action(this.params) with saveChanges()

You essentially need to do the same in the plugin:
obj.timer = window.setInterval("config.macros.upload.action();", [...]
becomes
obj.timer = window.setInterval("saveChanges();", [...]

Make sure you always have a verified backup when using this.


-- F.

M)

unread,
Jun 29, 2009, 5:13:52 PM6/29/09
to TiddlyWiki
> You essentially need to do the same in the plugin:
>      obj.timer = window.setInterval("config.macros.upload.action();", [...]
> becomes
>      obj.timer = window.setInterval("saveChanges();", [...]

I did do that and it didn't work. Any ideas? (I also maintain
backups.)

wolfgang

unread,
Jun 29, 2009, 9:38:08 PM6/29/09
to TiddlyWiki
Though you must be aware of this other thread, still I would like to
mention DraftsPlugin for this purpose:

http://groups.google.com/group/TiddlyWikiDev/browse_thread/thread/bc8bf0c9bd48572e/193b96ea0d408910?lnk=gst&q=auto%2Bsave#193b96ea0d408910

It worked well when I tested it. However, automatic saveChanges at
intervals do freeze the browser for short moments, which I found too
disruptive.

regards..
Reply all
Reply to author
Forward
0 new messages