Timed scanning…

Viewing 10 posts - 1 through 10 (of 17 total)
  • Author
    Posts
  • #812
    Dave.B
    Participant

    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?

    #7495
    fizze
    Participant

    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+wget

    donno if that would still work, given its been a while…..

    #7496
    rpedde
    Participant

    @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+wget

    donno 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…

    #7497
    fizze
    Participant

    …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:[email protected]:port/config-update.html?action=rescan"

    then schedule that script, and voila.
    if you’re on a mac you got cron anyway. 🙂

    #7498
    sonichouse
    Participant

    On XP you can do the following

    at 04:00 pathtowget http://user:[email protected]:port/config-update.html?action=rescan

    This will run at 4:00 AM every day

    #7499
    Dave.B
    Participant

    Wow, 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. 😀

    #7500
    fizze
    Participant

    haha, 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:[email protected]:port/config-update.html?action=rescan

    should do the trick, if you want to run the rescan every day at 05:00 (am)

    #7501
    Dave.B
    Participant

    Thanks fizze, I’ll have a bit of a play…

    #7502
    Dave.B
    Participant

    OK, 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.e

    0 5 * * * /opt/bin/wget http://user:[email protected]: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
    Dave

    #7503
    [email protected]
    Participant

    You’re right 😉

Viewing 10 posts - 1 through 10 (of 17 total)
  • The forum ‘Feature Requests’ is closed to new topics and replies.