Scheduler



  • scheduler start/stop time only every 15 min.
    0
    15
    30
    45
    59

    what to do if it is necessary for me i need start/stop time every 5 - 10 min?



  • The current software only supports 15-minute intervals. If you really need 5 or 10-minute intervals then you would have to do some coding yourself.



  • i find /usr/local/www/firewall_shedule_edit.php
    in code replace

    <------><------><------><------>  <----><------><------><------>   
    <------><------><------><------>  <----><------><------><------><select name="starttimemin" class="formselect" id="starttimemin"><------><------><------><------>  <----><------><------><------><------><option value="00">00</option><------><------><------><------>  <----><------><------><------><------><option value="15">15</option><------><------><------><------>  <----><------><------><------><------><option value="30">30</option><------><------><------><------>  <----><------><------><------><------><option value="45">45</option><------><------><------><------>  <----><------><------><------><------><option value="59">59</option><------><------><------><------>  <----><------><------><------></select> 
    <------><------><------><------>  <----><------><------>
    <------><------><------><------>  <----><------><------>
    <------><------><------><------>  <----><------><------>
    <------><------><------><------>  <----><------><------><------><select name="stoptimehour" class="formselect" id="stoptimehour"><------><------><------><------>  <----><------><------><------><------><------><------><------>  <----><------><------><------><------><------>for ($i=0; $i<24; $i++)<------><------><------><------>  <----><------><------><------><------><------>{<------><------><------><------>  <----><------><------><------><------><------><------>if ($i==23)<------><------><------><------>  <----><------><------><------><------><------><------><------>$selected = "selected=\"selected\"";<------><------><------><------>  <----><------><------><------><------><------><------>else<------><------><------><------>  <----><------><------><------><------><------><------><------>$selected = "";<------><------><------><------>  <----><------><------><------><------><------><------><------><------><------><------><------>  <----><------><------><------><------><------><------>echo "<option value="\&quot;$i\&quot;" $selected="">";<------><------><------><------>  <----><------><------><------><------><------><------>echo $i;<------><------><------><------>  <----><------><------><------><------><------><------>echo "</option>";<------><------><------><------>  <----><------><------><------><------><------>}<------><------><------><------>  <----><------><------><------><------>?><------><------><------><------>  <----><------><------><------></select>   
    <------><------><------><------>  <----><------><------><------><select name="stoptimemin" class="formselect" id="stoptimemin"><------><------><------><------>  <----><------><------><------><------><option value="00">00</option><------><------><------><------>  <----><------><------><------><------><option value="15">15</option><------><------><------><------>  <----><------><------><------><------><option value="30">30</option><------><------><------><------>  <----><------><------><------><------><option value="45">45</option><------><------><------><------>  <----><------><------><------><------><option value="59" selected="selected">59</option><------><------><------><------>  <----><------><------><------></select> 
    <------><------><------><------>  <----><------><------>
    <------><------><------><------>  <----><------>
    <------><------><------><------>  <---->
    
    

    to

    <------><------><------><------>  <----><------><------><------><select name="stoptimehour" class="formselect" id="stoptimehour"><------><------><------><------>  <----><------><------><------><------><------><------><------>  <----><------><------><------><------><------>for ($i=0; $i<24; $i++)<------><------><------><------>  <----><------><------><------><------><------>{<------><------><------><------>  <----><------><------><------><------><------><------>if ($i==23)<------><------><------><------>  <----><------><------><------><------><------><------><------>$selected = "selected=\"selected\"";<------><------><------><------>  <----><------><------><------><------><------><------>else<------><------><------><------>  <----><------><------><------><------><------><------><------>$selected = "";<------><------><------><------>  <----><------><------><------><------><------><------><------><------><------><------><------>  <----><------><------><------><------><------><------>echo "<option value="\&quot;$i\&quot;" $selected="">";<------><------><------><------>  <----><------><------><------><------><------><------>echo $i;<------><------><------><------>  <----><------><------><------><------><------><------>echo "</option>";<------><------><------><------>  <----><------><------><------><------><------>}<------><------><------><------>  <----><------><------><------><------>?><------><------><------><------>  <----><------><------><------></select>   
    <------><------><------><------>  <----><------><------><------><select name="stoptimemin" class="formselect" id="stoptimemin"><------><------><------><------>  <----><------><------><------><------><option value="00">00</option><------><------><------><------>  <----><------><------><------><------><option value="05">05</option><------><------><------><------>  <----><------><------><------><------><option value="10">10</option><------><------><------><------>  <----><------><------><------><------><option value="15">15</option><------><------><------><------>  <----><------><------><------><------><option value="20">20</option><------><------><------><------>  <----><------><------><------><------><option value="25">25</option><------><------><------><------>  <----><------><------><------><------><option value="30">30</option><------><------><------><------>  <----><------><------><------><------><option value="35">35</option><------><------><------><------>  <----><------><------><------><------><option value="40">40</option><------><------><------><------>  <----><------><------><------><------><option value="45">45</option><------><------><------><------>  <----><------><------><------><------><option value="50">50</option><------><------><------><------>  <----><------><------><------><------><option value="55">55</option><------><------><------><------>  <----><------><------><------><------><option value="59" selected="selected">59</option><------><------><------><------>  <----><------><------><------></select> 
    

    in Firewall: Schedules: Edit i see every 5 min. may save..
    i firewall - rules i see every 5 min active/inactive shedule
    but really rule work start/stop every 15 min


  • Banned

    @Jintaro:

    in code replace

    I would suggest to avoid the replacement, will make a giant kaboom with all those visual tabs you posted. People, what's wrong with using diff?!



  • When there are rules that use a schedule, pfSense will add a cron job:

    0,15,30,45  	*  	*  	*  	*  	root  	/etc/rc.filter_configure_sync 
    

    That job is set to run ever 15 minutes. It will effectively cause the ruleset to be parsed for rules that are in/out based on schedules and do its stuff. So you need that cron job to run every 5 minutes also. It's somewhere in the code - I will let you find it as a learning exercise :)

    And remember, after every upgrade you will need to re-check what mods need to be made and then re-apply your changes.


Log in to reply