Freshrss: Automatic refresh every 2 minutes via Cron

Created on 5 Apr 2017  ยท  40Comments  ยท  Source: FreshRSS/FreshRSS

Hi everyone,

I am using FreshRSS 1.6.3 and Ubuntu 16.04 with apache2. I want my server to refresh the feed every 2 minutes. I was thinking about a cron job, but i did not work for me...

Can you tell me how i can set an automatic feed updater?

Thanks,

GeoZzNL

Documentation

Most helpful comment

Thanks for the feedback.
By running the cron so often, most of the time the list of feeds to update will be empty (you can see the logs). Indeed, there is still the general and per-feed limit to how often they are refreshed.
If you start having many feeds, it is good to ensure that one cron is done before starting the next one (5 minutes should be enough for many cases), although FreshRSS should be able to cope with multiple cron refresh at the same time.

All 40 comments

Hello,
See https://github.com/FreshRSS/FreshRSS/tree/dev#example-on-debian--ubuntu
I it does not work, please post your configuration.

But I would advise against refreshing so often. In any case, there is also a limit on how often FreshRSS will refresh a feed: a global one, and one per feed.
If you need instant notifications, I suggest relying on PubSubHubbub, which is natively supported by FreshRSS.

Thanks! I will give it a try today

If it is not working, post your code here, together with the output (e.g. /tmp/FreshRSS.log if you redirect the output of your cron there)

systemctl status cron:

(systemFreshRSS) WRONG FILE OWNER

What do i have to do? Actually, all the cron jobs in there saying this.

And, its not making a .log file

Thanks.

What does the 6.36 mean? At the beginning of the code line in /etc/cron.d/FreshRSS

6,36 means that it will run at 6 and 36 minutes of each hour.
Wrong file owner means that your cron file has not the proper rights.
Please show a ls -alh /etc/cron.d/

root@geozzservernl01:~# ls -alh /etc/cron.d/
totaal 40K
drwxrwxr-x   2 www-data www-data 4,0K apr  6 14:58 .
drwxr-xr-x 146 root     root      12K apr  6 14:51 ..
-rw-rw-r--   1 www-data www-data  244 dec 29  2014 anacron
-rw-rw-r--   1 geozznl  geozznl    99 apr  4 23:56 FreshRSSRSS
-rw-rw-r--   1 www-data www-data  589 jul 16  2014 mdadm
-rw-rw-r--   1 www-data www-data  670 mrt  1  2016 php
-rw-rw-r--   1 www-data www-data  102 apr  5  2016 .placeholder
-rw-rw-r--   1 www-data www-data  191 apr  3 20:51 popularity-contest

How can i make it refresh more, like 4 times per hour?

[Edited: wrong command]

And to enable the cron more often, you can for instance use the following syntax:

7,22,37,52 * * * * www-data php -f /usr/share/FreshRSS/app/actualize_script.php > /tmp/FreshRSS.log 2>&1

I hope you got it to work :-)

totaal 40K
drwxrwxr-x 2 www-data www-data 4,0K apr 6 14:58 .
drwxr-xr-x 146 root root 12K apr 6 14:51 ..
-rw-rw-r-- 1 www-data www-data 244 dec 29 2014 anacron
-rw-rw-r-- 1 geozznl geozznl 99 apr 4 23:56 FreshRSS
-rw-rw-r-- 1 www-data www-data 589 jul 16 2014 mdadm
-rw-rw-r-- 1 www-data www-data 670 mrt 1 2016 php
-rw-rw-r-- 1 www-data www-data 102 apr 5 2016 .placeholder
-rw-rw-r-- 1 www-data www-data 191 apr 3 20:51 popularity-contest

After sudo chown www-data:www-data /etc/cron.d/FreshRSS

totaal 40K
drwxrwxr-x 2 www-data www-data 4,0K apr 6 14:58 .
drwxr-xr-x 146 root root 12K apr 6 14:51 ..
-rw-rw-r-- 1 www-data www-data 244 dec 29 2014 anacron
-rw-rw-r-- 1 www-data www-data 99 apr 4 23:56 FreshRSS
-rw-rw-r-- 1 www-data www-data 589 jul 16 2014 mdadm
-rw-rw-r-- 1 www-data www-data 670 mrt 1 2016 php
-rw-rw-r-- 1 www-data www-data 102 apr 5 2016 .placeholder
-rw-rw-r-- 1 www-data www-data 191 apr 3 20:51 popularity-contest

Ah, right. I think the whole folder should be owned by root. Try:

sudo chown root:root -R /etc/cron.d/

Thanks, changed it:

totaal 40K
drwxrwxr-x 2 root root 4,0K apr 10 13:26 .
drwxr-xr-x 146 root root 12K apr 6 14:51 ..
-rw-rw-r-- 1 root root 244 dec 29 2014 anacron
-rw-rw-r-- 1 root root 105 apr 10 13:26 FreshRSS
-rw-rw-r-- 1 root root 589 jul 16 2014 mdadm
-rw-rw-r-- 1 root root 670 mrt 1 2016 php
-rw-rw-r-- 1 root root 102 apr 5 2016 .placeholder
-rw-rw-r-- 1 root root 191 apr 3 20:51 popularity-contest

Now i will wait until the first .log is made :) ill let you know

You should probably restart your cron service:

service cron restart

Until now, the first cronjob isnt made. I'll wait one hour, and check again :)

Its not working, no .config file and the rss is not updated

ls -alh /etc/cron.d/ is all on root

Try to look at your /var/log/syslog. E.g. :

grep -i CRON /var/log/syslog

What do you mean with no .config file ?

sorry, i mean log file in /usr/share/

Wow. A lot of errors all saying: INSECURE MODE (group/other writable)

I think i have to make a group, right? I did not do that so far

No. You just have rights problems on your CRON files. Try

sudo chmod g-w -R /etc/cron.d/

Its not working, sorry

This is at the end: Apr 10 22:20:51 geozzservernl01 cron[12139]: (CRON) INFO (pidfile fd = 3)
Apr 10 22:20:51 geozzservernl01 cron[12139]: (CRON) INFO (Skipping @reboot jobs -- not system startup)

This last line is not an error. It is normal.
Try to restart your cron service, and check for errors in syslog

sudo service cron restart

Yes done that a couple times, but its not working

What do you mean by not working? Any errors?
Try this exact configuration https://github.com/FreshRSS/FreshRSS/tree/dev#example-on-debian--ubuntu
Then wait for xx:06 or xx:36 and look at /tmp/FreshRSS.log

I have changed the cron from /usr/share//FreshRSS/app/actualize_script.phpto /var/www/FreshRSS/app/actualize_script.phpand now is he making a log:

Could not open input file: /etc/www/FreshRSS/app/actualize_script.php

While FreshRSS is installed in /var/www//FreshRSS

  1. In what path have you installed FreshRSS?
  2. What is the content of your cron file?

Hi Alkarex,

Its working great now. I have configured cron to update FreshRSS every 5 minutes.

I have tested it for a week (to check if 5 minutes is to much) but everything works awesome. No IP ban or whatever.

My installation path: /var/www/FreshRSS
cron.d: 0,5,10,15,20,25,30,35,40,45,50,55 ** www-data php -f /var/www/FreshRSS/app/actualize_script.php > /tmp/FreshRSS.log 2>&1

Log file: Starting feed actualization at ...........
Actualize (users......)
Done
ETC ETC

Its great! Thank you very much.

Thanks for the feedback.
By running the cron so often, most of the time the list of feeds to update will be empty (you can see the logs). Indeed, there is still the general and per-feed limit to how often they are refreshed.
If you start having many feeds, it is good to ensure that one cron is done before starting the next one (5 minutes should be enough for many cases), although FreshRSS should be able to cope with multiple cron refresh at the same time.

hi
how to run Automatic refresh in win server 2016 ?
tnx.

Perhaps Windows Server has better tools available, but the typical way is the Windows Task Scheduler.

2019-01-07 09_13_16-task scheduler

Thanks, but how? Should I write a script? I do not know ?

Is it possible to modify the Actualize file in the source file to automatically update it?

Thank you very much for the advice you gave me but can I make changes to
the Actualize source file that causes this to happen?

Is it possible to modify the Actualize file in the source file to
automatically update it?

tnx.๐Ÿ‘๐Ÿ‘๐Ÿ‘๐Ÿ‘๐Ÿ‘๐Ÿ‘๐Ÿ‘๐Ÿ‘๐Ÿ‘๐Ÿ‘๐Ÿ‘๐Ÿ‘

On Mon, Jan 7, 2019 at 12:14 AM Frans de Jonge notifications@github.com
wrote:

Perhaps Windows Server has better tools available, but the typical way is
the Windows Task Scheduler.

[image: 2019-01-07 09_13_16-task scheduler]
https://user-images.githubusercontent.com/202757/50756427-84740d00-125c-11e9-8bbd-959c5df69c30.png

โ€”
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
https://github.com/FreshRSS/FreshRSS/issues/1481#issuecomment-451853911,
or mute the thread
https://github.com/notifications/unsubscribe-auth/Aks5Z_pJACbSb3Www1RqkGr6gmINL2baks5vAwHIgaJpZM4MzgSf
.

I don't know how PHP works on Windows, but in principle you create a basic task, say how often you want to run it, under program/script you put php if it's in $PATH or otherwise the full path to the relevant executable, and in arguments the path to FreshRSS/app/actualize_script.php.

Then under advanced you can set it to run more often than once a day.

Same as described here: https://github.com/FreshRSS/FreshRSS#automatic-feed-update

Grateful .
But I did not get to my goal. I hope I can.
You worked hard and thank you very much

On Tue, Jan 8, 2019 at 12:05 AM Frans de Jonge notifications@github.com
wrote:

I don't know how PHP works on Windows, but in principle you create a basic
task, say how often you want to run it, under program/script you put php
if it's in $PATH or otherwise the full path to the relevant executable, and
in arguments the path to FreshRSS/app/actualize_script.php.

Then under advanced you can set it to run more often than once a day.

Same as described here:
https://github.com/FreshRSS/FreshRSS#automatic-feed-update

โ€”
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
https://github.com/FreshRSS/FreshRSS/issues/1481#issuecomment-452208435,
or mute the thread
https://github.com/notifications/unsubscribe-auth/Aks5Z4N4mZy5jLrM15yEhwTTb8twTzCxks5vBFE4gaJpZM4MzgSf
.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

javerous picture javerous  ยท  5Comments

cwldev picture cwldev  ยท  5Comments

Alkarex picture Alkarex  ยท  5Comments

treyssatvincent picture treyssatvincent  ยท  5Comments

Offerel picture Offerel  ยท  5Comments