aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorB. Stack <bgstack15@gmail.com>2023-06-21 16:19:59 -0400
committerB. Stack <bgstack15@gmail.com>2023-06-21 16:19:59 -0400
commit3e37e0521fbcd5130ee66b42def77553926c29d6 (patch)
treee868a900125ac4e1bcb6177e89ced7ea217b3002
parentinitial commit (diff)
downloadnewspipe-docker-master.tar.gz
newspipe-docker-master.tar.bz2
newspipe-docker-master.zip
add cron example for fetching feedsHEADmaster
-rw-r--r--README.md13
-rw-r--r--contrib/newspipe_cron3
-rwxr-xr-xcontrib/newspipe_cron.sh3
3 files changed, 19 insertions, 0 deletions
diff --git a/README.md b/README.md
index 80bd986..4ec3a1d 100644
--- a/README.md
+++ b/README.md
@@ -35,6 +35,19 @@ Or if it is currently running in docker-compose:
docker-compose exec newspipe entrypoint.sh create_admin admin "123456789"
+## Fetching feeds
+Because I'm too lazy to change the container to use uwsgi-python or something that can handle the jobs parts of flask, I wrote a cron job to run this shell script:
+
+ #!/bin/sh
+ cd ~/newspipe-docker
+ docker-compose exec newspipe /usr/bin/poetry run flask fetch_asyncio
+
+Here's the cron entry:
+
+ 25 3,15 * * * root /home/newspipe/newspipe-docker/contrib/newspipe_cron.sh 1>/dev/null 2>&1 &
+
+These files are in directory `contrib/`.
+
# Improve
Future improvements include:
diff --git a/contrib/newspipe_cron b/contrib/newspipe_cron
new file mode 100644
index 0000000..441361e
--- /dev/null
+++ b/contrib/newspipe_cron
@@ -0,0 +1,3 @@
+# File: newspipe_cron
+# Project: newspipe-docker
+25 3,15 * * * root /home/newspipe/newspipe-docker/contrib/newspipe_cron.sh 1>/dev/null 2>&1 &
diff --git a/contrib/newspipe_cron.sh b/contrib/newspipe_cron.sh
new file mode 100755
index 0000000..2b9e8f1
--- /dev/null
+++ b/contrib/newspipe_cron.sh
@@ -0,0 +1,3 @@
+#!/bin/sh
+cd ~/newspipe-docker
+docker-compose exec newspipe /usr/bin/poetry run flask fetch_asyncio
bgstack15