Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] Docker cron not working #5894

Closed
misaligar opened this issue Nov 19, 2023 · 10 comments · Fixed by #5795
Closed

[BUG] Docker cron not working #5894

misaligar opened this issue Nov 19, 2023 · 10 comments · Fixed by #5795
Labels
Bug (unconfirmed) issues thar could not reproduced yeat Docker Everything related to Docker
Milestone

Comments

@misaligar
Copy link

misaligar commented Nov 19, 2023

Describe the bug
FreshRSS does not auto update the feed with CRON_MIN variable set.

To Reproduce
Steps to reproduce the behavior:
Wait at least half an hour for feed auto-refresh. Nothing happens. I know this for sure because when I click the refresh button on the web interface, all of my feeds are updated and the number of unread articles increases.

Expected behavior
Auto update feed every 30 minutes.

Screenshots
N/A

Environment information (please complete the following information):

  • Device: Mini PC Server, Intel N100
  • OS: Debian 12
  • Browser: Firefox 119
  • FreshRSS version: 1.22.1
  • Database version: SQlite
  • PHP version: I don't know
  • Installation type: Docker

Additional context
See docker compose below. I've tried both 2,32 and '2,32'. Same result.

version: "3.8"
services:
  freshrss:
    network_mode: bridge
    environment:
      - TZ=America/New_York
      - CRON_MIN=2,32
    image: freshrss/freshrss:latest
    container_name: freshrss
    ports:
      - 8080:80
    restart: always
    volumes:
      - /home/lab/.freshrss/data:/var/www/FreshRSS/data
      - /home/lab/.freshrss/extensions:/var/www/FreshRSS/extensions

@math-GH
Copy link
Contributor

math-GH commented Nov 19, 2023

I hope, that you are using 1.22.1 and not 1.11.1 ;)
Which Docker repository do you use?

@math-GH math-GH added Docker Everything related to Docker Bug (unconfirmed) issues thar could not reproduced yeat labels Nov 19, 2023
@misaligar
Copy link
Author

@math-GH yes, typo. sorry :) now corrected.

@viviicat
Copy link

I may be seeing this as well. My feeds mysteriously seemed to stop updating.

@JanKnipp
Copy link

Seeing the same issue. Manual update works fine but cron does not update the feeds anymore.

@sdelafond
Copy link

Manual update works fine but no cron'ed auto-updates seem to take place. I'm using the official image. The same exact docker-compose setup updated fine through cron in 1.21.0.

@Alkarex
Copy link
Member

Alkarex commented Nov 21, 2023

Could some of you try the following commands:

docker exec freshrss cat /etc/issue
docker exec freshrss sh -c 'echo $CRON_MIN'
docker exec freshrss cat /tmp/FreshRSS.log
docker exec freshrss cat /etc/crontab.freshrss.default
docker exec freshrss crontab -l
docker exec freshrss cat /var/www/FreshRSS/Docker/env.txt

And could you try with our edge branch?
For some of you, it might be a duplicate of #5792 , which is already fixed #5795

@sdelafond
Copy link

host # docker compose exec freshrss bash
root@freshrss:~# cat /etc/issue
Debian GNU/Linux 12 \n \l

root@freshrss:~# echo $CRON_MIN
3,33
root@freshrss:~# cat /tmp/FreshRSS.log
cat: /tmp/FreshRSS.log: No such file or directory
root@freshrss:~# cat /etc/crontab.freshrss.default
7,37 * * * * . /var/www/FreshRSS/Docker/env.txt;                su www-data -s /bin/sh -c 'php /var/www/FreshRSS/app/actualize_script.php'             2>> /proc/1/fd/2 > /tmp/FreshRSS.log
root@freshrss:~# crontab -l
3,33 * * * * . /var/www/FreshRSS/Docker/env.txt;                su www-data -s /bin/sh -c 'php /var/www/FreshRSS/app/actualize_script.php'             2>> /proc/1/fd/2 > /tmp/FreshRSS.log
root@freshrss:~# cat /var/www/FreshRSS/Docker/env.txt
export --base_url <redacted>
export --db-base freshrss
export --db-host freshrss-db
export --db-password <redacted>
export --db-type pgsql
export --db-user freshrss
export --default_user admin
export --email <redacted>
export --language en
export --password <redacted>
export --user admin
export COPY_LOG_TO_SYSLOG=On
export COPY_SYSLOG_TO_STDERR=On
export CRON_MIN=3,33
export DATA_PATH=
export FRESHRSS_ENV=
export FRESHRSS_INSTALL=--api_enabled
export FRESHRSS_USER=--api_password <redacted>
export HOSTNAME=freshrss
export LISTEN=0.0.0.0:80
export OIDC_ENABLED=
export TRUSTED_PROXY=
export TZ=Europe/Paris

I don't use the TRUSTED_PROXY env variable.

I'll give freshrss/freshrss:pr5795 a spin when I find some spare time.

@Alkarex
Copy link
Member

Alkarex commented Nov 21, 2023

Please try freshrss/freshrss:edge (freshrss/freshrss:pr5795 does not exist anymore - the PR has been merged 3 weeks ago).

@sdelafond
Copy link

freshrss/fressh:edge does fix the issue, with feeds correctly updates every 30 minutes.

Alkarex added a commit to Alkarex/FreshRSS that referenced this issue Nov 21, 2023
Avoid keeping environment variables used for init.
Improvement of FreshRSS#5795
Spotted when checking FreshRSS#5894
Alkarex added a commit that referenced this issue Nov 21, 2023
Avoid keeping environment variables used for init.
Improvement of #5795
Spotted when checking #5894
@Alkarex
Copy link
Member

Alkarex commented Nov 21, 2023

I have just merged another related improvement in the edge branch #5898

@Alkarex Alkarex added this to the 1.23.0 milestone Nov 21, 2023
@Alkarex Alkarex linked a pull request Nov 21, 2023 that will close this issue
@Alkarex Alkarex closed this as completed Nov 21, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug (unconfirmed) issues thar could not reproduced yeat Docker Everything related to Docker
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants