The default autosave interval in Jupyter notebook is 120 seconds. You can change this with the %autosave
magic command for an individual notebook like this:
To change it for all of your notebooks, you need to modify the custom.js
file.
1. Navigate to your jupyter config directory, which you can find by running the following command in the Terminal:
jupyter --config-dir
2. Now, open the custom folder and open custom.js
in a text editor and add this code:
define([
'base/js/namespace',
'base/js/events'
],
function(IPython, events) {
events.on("notebook_loaded.Notebook",
function () {
IPython.notebook.set_autosave_interval(180000);
//in milliseconds
}
);
//may include additional events.on() statements
}
);
If you don't find custom.js
file, you can create one with the above code.
3. Save the file.