Community discussions

User avatar
Frequent Visitor
Frequent Visitor
Topic Author
Posts: 57
Joined: Thu May 05, 2005 10:50 pm
Reputation: 4
Location: USA Minneapolis, Minnesota

How To - Clear Script Run-Counters

Wed Jan 06, 2010 11:29 pm

# Clear Script Run Counters
# Counters can not be cleared but you can remove and add them back

:local sname
:local snumber
:local sruncount
:local ssource
:local spolicy

/system script

#Get Script Number
:foreach snumber in=[find run-count > 0] do={
# Get Script Number
:set sname [get value-name=name number=$snumber];
# Get Script Run-Count
:set sruncount [get value-name=run-count number=$snumber];
# Get Script Source
:set ssource [get value-name=source number=$snumber];
# Get Script Policy
:set spolicy [get value-name=policy number=$snumber];

#Remove Script
remove $snumber
#Add Script
add name=$sname source=$ssource policy=$spolicy


Who is online

Users browsing this forum: No registered users and 4 guests