# Brainstorm: Library sharing

**URL:** https://community.silverbullet.md/t/brainstorm-library-sharing/185
**Category:** Ideas
**Created:** [February 17, 2024, 8:27am UTC](https://community.silverbullet.md/t/brainstorm-library-sharing/185 "2024-02-17T08:27:47Z")
**Posts on this page:** 1
**Showing post:** 5

<div class="post-metadata">

### Author: ![zef](https://community.silverbullet.md/user_avatar/community.silverbullet.md/zef/32/7_2.png) [@zef](https://community.silverbullet.md/u/zef)
#### Post date: [February 17, 2024, 5:20pm UTC](https://community.silverbullet.md/t/brainstorm-library-sharing/185/5 "2024-02-17T17:20:07Z")

</div>

> [@Maarrk](#):
>
> First, introduce a way to run a command periodically, a bit like [`cron`](https://en.wikipedia.org/wiki/Cron) does, but configured in yaml, on some page like JOBS. That is definitely doable with a Plug, since Git Plug essentially does that. So you could make the automatic updates yourself if you put the `Import Library` command there, same as in a button. That would make pinging some remote server opt-in with a configurable frequency (daily, weekly etc.), and you can do exactly the same thing manually if you want, since it’s implemented as a command

This seems orthogonal to the discussion on how to _share_ libraries, but I agree this is a gap in space script. I see two obviously missing hooks we need to add, both are available to plugs but not space script yet:

- Cron (so periodic execution of logic), I can imagine introducing a `silverbullet.scheduleCron(“* * * * *”, () => { console.log(“Look at me, I run every minute”); })` type of API
- Event listening, e.g. `silverbullet.addEventListener(“editor:click”, (e) => { console.log(“Clicked in the editor!”, e); })`

Ah wait, now I see your reference to auto updating libraries using this. Yeah, I suppose that’s one way to do it.

---

_[View the full topic](https://community.silverbullet.md/t/brainstorm-library-sharing/185)._
