1
0
mirror of https://github.com/pirate/ArchiveBox.git synced 2025-08-26 07:44:41 +02:00

Created Scheduled archiving (markdown)

Nick Sweeting
2019-01-23 02:29:57 -05:00
parent c0de75b802
commit 48648fe71a

27
Scheduled-archiving.md Normal file

@@ -0,0 +1,27 @@
## Schedule importing new links into your archive
To schedule regular archiving you can use any task scheduler like `cron`, `at`, `sytsemd`, etc.
ArchiveBox ignores links that are imported multiple times (keeping the earliest version that it's seen).
This means you can add cron jobs that regularly poll the same file or URL for new links, adding only new
ones as necessary.
For some example configs, see the `etc/cron.d` and `etc/supervisord` folders.
## Example: Import Firefox browser history every 24 hours
This example exports your browser history and archives it once a day:
**Create `/opt/ArchiveBox/bin/custom.sh`:**
```bash
#!/bin/bash
cd /opt/ArchiveBox
./bin/archivebox-export-browser-history --firefox ./output/sources/firefox_history.json
./bin/archivebox ./output/sources/firefox_history.json >> /var/log/ArchiveBox.log
```
**Then create a new file `/etc/cron.d/Archivebox` to tell cron to run your script every 24 hours:**
```bash
0 24 * * * www-data /opt/ArchiveBox/bin/custom.sh
```