From 0c7af6afa6062df0a8fb07830c42b67fe4b320bc Mon Sep 17 00:00:00 2001 From: lluni Date: Fri, 9 Dec 2022 12:15:20 +0100 Subject: [PATCH] Updated post_toots.sh in README.md because it randomly broke --- README.md | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 25cda5c..04a3ad4 100644 --- a/README.md +++ b/README.md @@ -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.