# Setup for running cells on startup

**URL:** <https://discourse.jupyter.org/t/setup-for-running-cells-on-startup/9845>\
**Category:** General\
**Tags:** how-to\
**Created:** [July 2, 2021, 4:32pm UTC](https://discourse.jupyter.org/t/setup-for-running-cells-on-startup/9845 "2021-07-02T16:32:39Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Anton\_Akhmerov](https://yyz1.discourse-cdn.com/flex031/user_avatar/discourse.jupyter.org/anton_akhmerov/32/945_2.png) [@Anton\_Akhmerov](https://discourse.jupyter.org/u/Anton_Akhmerov)\
**Post date:** [July 2, 2021, 4:32pm UTC](https://discourse.jupyter.org/t/setup-for-running-cells-on-startup/9845/1 "2021-07-02T16:32:39Z")

</div>

This is a revival of essentially the same question as in the post below 👇, but for jupyterlab.

> [@Skill Scalable Prototype- Run all cells and go directly to notebook](https://discourse.jupyter.org/t/skill-scalable-prototype-run-all-cells-and-go-directly-to-notebook/7237):
>
> I am working on a skill scalable prototype. The idea is users with no coding experience can explore a data pipeline while users with some coding can get into the code and update it. Based on some feedback I have found no coders turn off if they see the code up front and will stop at initial obstacles so each cell has a “hide code” and “run code” button. I have the following binder which walk users through a data pipeline for crop yields. Open crop yield location interactive or crop yield regio…

For the purposes of setting up a user-friendly binder, I’d like to reduce the startup time, and ensure that all the cells are live right from the get-go. Executing all cells on startup would be 👌, however an even cooler option would be to [use dill](https://stackoverflow.com/questions/34342155/how-to-pickle-or-store-jupyter-ipython-notebook-session-for-later/50985430#50985430) to preserve a complete session and load it on startup.

To achieve this goal I need to configure an environment where I control everything, and which would run some or all cells when a notebook is opened. Previously, as far as I understand, this was achieved by means of frontend javascript in the classic notebook, however this approach seems fragile, and also hard to reproduce in jupyterlab. Is there a way to achieve this result in a frontend-independent, or at least jupyterlab-compatible way?
