Updated post_toots.sh in README.md because it randomly broke

This commit is contained in:
lluni 2022-12-09 12:15:20 +01:00
parent 7386bae4ed
commit 0c7af6afa6

View file

@ -15,14 +15,13 @@
4. Set all `.env` variables if there are any remaining. 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 ```sh
#!/bin/bash #!/bin/bash
conda activate reddit cd /absolute/path/to/reddit-mastodon-crossposter
python "/absolute/path/to/script.py" /absolute/path/to/conda run -n reddit python script.py
conda deactivate
``` ```
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. 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.