Fair enough, your original post indicated:
for day time( 07:00-22:00) clients will surf the net, email and yahoo.
which is what led me down the track of wanting to block by URL. If it is simply a port range you want to block at a given time, that is considerably easier.
First, the easiest way to do this is by using Policies for ENS. That way, there's no scripting / registry writing involved (Which I can't guarantee for you will work).
1. Setup a policy for "Everyone" that allows access for your normal operational hours. (07:00 to 22:00). Then, under the Advanced tab, add a series of Filters and Criteria where the criteria is "Server Port Number is 80", etc. Filters are ORred with other Filters, while Criteria within a filter is ANDed with other Criteria in that same filter.
That policy will grant access to the specified ports for the specified time inclusion to all your users.
2. Setup a second policy for "Everyone" that allows access during the alternative hours (22:00 to 07:00 - you'll need to specify two time ranges). In this one, don't add any advanced criteria.
That policy will grant access to ALL ports for the specified time inclusion to all your users.
That should do what you described.