Change Default autosave Interval in JupyterLab

Updated 7/2/2020.

The default autosave interval in JupyterLab is 120 seconds. You can change this using the %autosave magic command for an individual notebook like this:

IPython Notebook autosave

But if you want to change it for all your notebooks, you need to modify the custom.js file settings.

  1. 2255From Settings, select Advanced Settings Editor:
    Jupyter Advanced Settings Menu
  2. Under User Preferences, add an autosaveInterval setting and click the Save icon:
  1. Navigate to your jupyter config directory, which you can find by typing the following at the command line:
    jupyter --config-dir
  2. From there, open the custom folder. My complete path is C:\Users\Nat\.jupyter\custom
  3. In that folder, you should find a custom.js file. If there isn’t one, you should be able to create one. Open it in a text editor and add this code:
        function(IPython, events) {
            	function () {
      				IPython.notebook.set_autosave_interval(180000); //in milliseconds
            //may include additional events.on() statements
  4. Save the file.

Related Training: Advanced Python

About Webucator

Webucator provides instructor-led training to students throughout the US and Canada. We have trained over 90,000 students from over 16,000 organizations on technologies such as Microsoft ASP.NET, Microsoft Office, Azure, Windows, Java, Adobe, Python, SQL, JavaScript, Angular and much more. Check out our complete course catalog.