Updated post_toots.sh in README.md because it randomly broke
This commit is contained in:
parent
7386bae4ed
commit
0c7af6afa6
1 changed files with 3 additions and 4 deletions
|
@ -15,14 +15,13 @@
|
|||
|
||||
4. Set all `.env` variables if there are any remaining.
|
||||
|
||||
5. Create an `post_toots.sh` and make it executable:
|
||||
5. Create a script `post_toots.sh` and make it executable `chmod +x post_toots.sh`:
|
||||
|
||||
```sh
|
||||
#!/bin/bash
|
||||
|
||||
conda activate reddit
|
||||
python "/absolute/path/to/script.py"
|
||||
conda deactivate
|
||||
cd /absolute/path/to/reddit-mastodon-crossposter
|
||||
/absolute/path/to/conda run -n reddit python script.py
|
||||
```
|
||||
|
||||
6. Open the a (user) cronjob editor with `crontab -e` and add the line `0 * * * * /absolute/path/to/post_toots.sh > /dev/null 2>&1`. This cronjob runs hourly and the command outputs are not mailed to the user. Alternatively, `2>&1` can be ommited for debugging purposes if the error outputs should be mailed to the user.
|
||||
|
|
Loading…
Reference in a new issue