Skip to content
This repository has been archived by the owner on Jan 5, 2021. It is now read-only.

Commit

Permalink
Merge pull request #9 from HLFH/master
Browse files Browse the repository at this point in the history
Add systemd timers
  • Loading branch information
dalf authored Apr 16, 2020
2 parents dc199fc + 92f391a commit a8b34e2
Showing 1 changed file with 39 additions and 1 deletion.
40 changes: 39 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ To make engines work correctly as much as possible, please update the examined `

## Installation

```
```zsh
git clone git@github.com:searx/searx-checker.git
cd searx-checker
mkdir -p html/data
Expand Down Expand Up @@ -87,6 +87,44 @@ proxy / localhost:4004 {
}
```

## systemd timers

`systemd` offers a modern built-in cron-like job scheduler with `systemd timers`.

```zsh
vim /etc/systemd/system/searx-checker.timer
```

```systemd
[Unit]
Description=Daily update of the engine statistics of your public Searx instance
[Timer]
OnCalendar=daily
RandomizedDelaySec=1h
Persistent=true
[Install]
WantedBy=timers.target
```

Please replace below *instance_url* by the URL of your Searx instance.

```zsh
vim /etc/systemd/system/searx-checker.service
```

```systemd
[Unit]
Description=searx-checker status renewal
[Service]
Type=oneshot
User=http
WorkingDirectory=/srv/http/searx-checker
ExecStart=/srv/http/searx-checker/venv/bin/python3 checker/checker.py -o html/data/status.json instance_url
```

## Docker

To use `searx-checker` with Docker, please go to [the `searx-docker` project](https://github.com/searx/searx-docker).

0 comments on commit a8b34e2

Please sign in to comment.