FireFly Media Server › Firefly Media Server Forums › Firefly Media Server › Feature Requests › Timed scanning…
- This topic has 16 replies, 6 voices, and was last updated 17 years, 10 months ago by Dave.B.
-
AuthorPosts
-
22/11/2006 at 6:50 PM #812Dave.BParticipant
Just a thought, inspired by me fiddling with my virus scanner scheduler and my backup software scheduler:
Instead of supplying just a rescan interval on the config page, would it be hard to change it so that you can have more options controlling exactly when it scans?
For example, I would like to be able to tell Firefly to rescan my database once every day, at 4 am. That way I will never see it scan, and any new music will automatically get added. At the moment my rescan interval is 0 because scans seemed to be conflicting with normal operation a while ago (that could be fxed now – I don’t know).
I realise I can almost do this already by setting the scan interval to 86400 seconds, and “Always scan” to “Yes”, but to get it to scan at 4am, presumably I would need to make the change to the config file at that time? I don’t do 4 am for anyone!
Good idea/bad idea?
22/11/2006 at 7:06 PM #7495fizzeParticipantwell, ron somewhen suggested that a wget to a certain URL would trigger a rescan…
ah, there you go:
http://forums.fireflymediaserver.org/viewtopic.php?t=3779&highlight=rescan+wgetdonno if that would still work, given its been a while…..
23/11/2006 at 12:38 AM #7496rpeddeParticipant@fizze wrote:
well, ron somewhen suggested that a wget to a certain URL would trigger a rescan…
ah, there you go:
http://forums.fireflymediaserver.org/viewtopic.php?t=3779&highlight=rescan+wgetdonno if that would still work, given its been a while…..
.. and with a wget for win32, a batch file and windows scheduled tasks, that would work.
Might be worth a helper app or something though for the poor windows users that don’t have a scriptable operating system…
23/11/2006 at 7:33 AM #7497fizzeParticipant…well thats all there for windoze π
http://users.ugent.be/~bpuype/wget/
and the script would be one^h^h^h two lines:
@echo off
wget "http://user:password@server:port/config-update.html?action=rescan"then schedule that script, and voila.
if you’re on a mac you got cron anyway. π23/11/2006 at 5:56 PM #7498sonichouseParticipantOn XP you can do the following
at 04:00 pathtowget http://user:password@server:port/config-update.html?action=rescan
This will run at 4:00 AM every day
23/11/2006 at 10:19 PM #7499Dave.BParticipantWow, I never knew about that “at” command – cheers, it will probably come in very handy.
Anyway, I’m running Firefly on a slug, so I’d want to run a script on that. And as I have no idea how to write a script for Linux, let alone run it at specified times, it means that I’ve got to go away and do some reading – I’ll probably figure it out eventually, but in terms of use-ability for Linux novices (like me), I reckon this (small?) enhancement to the web-config page could be worthwhile.Just an idea. Whether it gets added or not, keep up the good work. Firefly is a great piece of software that is appreciated every single day in my home. π
24/11/2006 at 8:41 AM #7500fizzeParticipanthaha, well if you run it on the slug its even easier π
ipkg install cron
although im not even sure thats neccesary.
then edit your crontab with your fave editor, or just use
crontab -e
(crontab normalyl sits in /etc/crontab or so) which will invoke vi and will probably leave you puzzled *g* π
so a new line in crontab like this
5 0 * * * /opt/bin/wget http://user:password@server:port/config-update.html?action=rescan
should do the trick, if you want to run the rescan every day at 05:00 (am)
24/11/2006 at 9:33 AM #7501Dave.BParticipantThanks fizze, I’ll have a bit of a play…
28/01/2007 at 10:23 PM #7502Dave.BParticipantOK, I realise this was ages ago now, but I was just having a bit of a play with this. I found http://en.wikipedia.org/wiki/Cron
In the example fizze gave me above, shouldn’t the 5 and the 0 swap places? i.e0 5 * * * /opt/bin/wget http://user:password@server:port/config-update.html?action=rescan
Surely in fizze’s example it scans at 5 minutes past midnight, every day, month etc… In what I’ve put above, (I think) it scans at 0 minutes past 5, every day, month etc… Similar effects, but I’m often up long past midnight.
Am I right? I want to make sure before I go fiddling with stuff I only half understand.
Cheers
Dave28/01/2007 at 10:43 PM #7503M@rkParticipantYou’re right π
-
AuthorPosts
- The forum ‘Feature Requests’ is closed to new topics and replies.