4 Replies Latest reply on Mar 10, 2011 2:10 PM by jont717

    Time based download blocking

    jont717

      Is there a way I can sent time base blocking to my "Download Blocking" rule.

       

      I currently block downloads larger than X bytes.  This works fine.  I would like to set it to only be active from 8 - 4pm EST.

       

      Any advice?

        • 1. Time based download blocking
          asabban

          Hello,

           

          you can add the properties DateTime.Time.Hour and DateTime.Time.Minute do do this. They contain the hour and the minute of the current time. You can use this to say something like

           

          You can add a criteria to your rule that makes the rule only active when

           

          DateTime.Time.Hour > 8 and DateTime.Time.Hour < 17.

           

          Doing so the rule should only match from 8:00 to 16:59 (note that this is 24h time format).

           

          I have honestly not tried that, but I think it should work this way. Do you want to give this a try?

           

          Best,

          Andre

          • 2. Time based download blocking
            jont717

            This does not seem to work.  Still blocks all the time.

             

            time.png

            • 3. Time based download blocking

              That looks like a logic problem. Was your client IP 172.16.122.4 in this test?

              basically you ar saying if client ip is 172.16.122.4 then apply this, or if client ip is 172.16.122.9 and time is between 12 and 13 then apply this.

              if you put parentheses around the two client Ip statements, you should get "if (one of these IPs) and (between 12 and 13) then do.. "

               

              cheers

              sven

              • 4. Time based download blocking
                jont717

                Good catch.  If I wasn't rushing I probably would have caught that.

                 

                Issue resolved.