Community discussions

MikroTik App
 
namo
Long time Member
Long time Member
Topic Author
Posts: 530
Joined: Sat Oct 03, 2009 4:44 pm

correct this script

Fri Jul 26, 2013 11:07 pm

what is wrong in this script? It is not working

:local day [:pick [/system clock get date] 4 6];
:if ($day = "15") do={
/ip ppp secret disable [/ip ppp secret find profile="to be deleted 0400"]
/ip ppp secret set [/ip ppp secret find profile="0400kbps money"] profile="0400kbps not paid"
/ip ppp secret disable [/ip ppp secret find profile="to be deleted 0800"]
/ip ppp secret set [/ip ppp secret find profile="0800kbps money"] profile="0800kbps not paid"
/ip ppp secret disable [/ip ppp secret find profile="to be deleted 1000"]
/ip ppp secret set [/ip ppp secret find profile="1000kbps money"] profile="1000kbps not paid"
/ip ppp secret disable [/ip ppp secret find profile="to be deleted 1200"]
/ip ppp secret set [/ip ppp secret find profile="1200kbps money"] profile="1200kbps not paid"
/ip ppp secret disable [/ip ppp secret find profile="to be deleted 1500"]
/ip ppp secret set [/ip ppp secret find profile="1500kbps money"] profile="1500kbps not paid"
/ip ppp secret disable [/ip ppp secret find profile="to be deleted 1600"]
/ip ppp secret set [/ip ppp secret find profile="1600kbps money"] profile="1600kbps not paid"
/ip ppp secret disable [/ip ppp secret find profile="to be deleted 2000"]
/ip ppp secret set [/ip ppp secret find profile="2000kbps money"] profile="2000kbps not paid"
}
:if ($day = "25") do={
/ip ppp secret set [/ip ppp secret find where profile="0400kbps not paid"] profile="to be deleted 0400"
/ip ppp secret set [/ip ppp secret find where profile="0800kbps not paid"] profile="to be deleted 0800"
/ip ppp secret set [/ip ppp secret find where profile="1000kbps not paid"] profile="to be deleted 1000"
/ip ppp secret set [/ip ppp secret find where profile="1200kbps not paid"] profile="to be deleted 1200"
/ip ppp secret set [/ip ppp secret find where profile="1500kbps not paid"] profile="to be deleted 1500"
/ip ppp secret set [/ip ppp secret find where profile="1600kbps not paid"] profile="to be deleted 1600"
/ip ppp secret set [/ip ppp secret find where profile="2000kbps not paid"] profile="to be deleted 2000"
/ip ppp secret profile set [/ip ppp secret profile find name="0400kbps money"]
/ip ppp secret profile set [/ip ppp secret profile find name="0800kbps money"]
/ip ppp secret profile set [/ip ppp secret profile find name="1000kbps money"]
/ip ppp secret profile set [/ip ppp secret profile find name="1200kbps money"]
/ip ppp secret profile set [/ip ppp secret profile find name="1500kbps money"]
/ip ppp secret profile set [/ip ppp secret profile find name="1600kbps money"]
/ip ppp secret profile set [/ip ppp secret profile find name="2000kbps money"]
/ip ppp secret set [/ip ppp secret find profile="0400kbps"] profile="0400kbps money"
/ip ppp secret set [/ip ppp secret find profile="0800kbps"] profile="0800kbps money"
/ip ppp secret set [/ip ppp secret find profile="1000kbps"] profile="1000kbps money"
/ip ppp secret set [/ip ppp secret find profile="1200kbps"] profile="1200kbps money"
/ip ppp secret set [/ip ppp secret find profile="1500kbps"] profile="1500kbps money"
/ip ppp secret set [/ip ppp secret find profile="1600kbps"] profile="1600kbps money"
/ip ppp secret set [/ip ppp secret find profile="2000kbps"] profile="2000kbps money"
}
 
User avatar
c0d3rSh3ll
Long time Member
Long time Member
Posts: 557
Joined: Mon Jul 25, 2011 9:42 pm
Location: [admin@Chile] >

Re: correct this script

Sat Jul 27, 2013 1:23 am

remove the "ip"
is
/ppp secret ...
 
fabiopires
just joined
Posts: 5
Joined: Tue Aug 06, 2013 4:33 pm

Re: correct this script

Tue Aug 06, 2013 6:05 pm

One week later, not even a thank you. :O
 
namo
Long time Member
Long time Member
Topic Author
Posts: 530
Joined: Sat Oct 03, 2009 4:44 pm

Re: correct this script

Wed Aug 07, 2013 12:11 pm

I just enter the forum today.

thank you c0d3rSh3ll

but the script still not working



:local day [:pick [/system clock get date] 4 6];
:if ($day = "15") do={
/ppp secret disable [/ppp secret find profile="to be deleted 0400"]
/ppp secret set [/ppp secret find profile="0400kbps money"] profile="0400kbps not paid"
/ppp secret disable [/ppp secret find profile="to be deleted 0800"]
/ppp secret set [/ppp secret find profile="0800kbps money"] profile="0800kbps not paid"
/ppp secret disable [/ppp secret find profile="to be deleted 1000"]
/ppp secret set [/ppp secret find profile="1000kbps money"] profile="1000kbps not paid"
/ppp secret disable [/ppp secret find profile="to be deleted 1200"]
/ppp secret set [/ppp secret find profile="1200kbps money"] profile="1200kbps not paid"
/ppp secret disable [/ppp secret find profile="to be deleted 1500"]
/ppp secret set [/ppp secret find profile="1500kbps money"] profile="1500kbps not paid"
/ppp secret disable [/ppp secret find profile="to be deleted 1600"]
/ppp secret set [/ppp secret find profile="1600kbps money"] profile="1600kbps not paid"
/ppp secret disable [/ppp secret find profile="to be deleted 2000"]
/ppp secret set [/ppp secret find profile="2000kbps money"] profile="2000kbps not paid"
}
:if ($day = "27") do={
/ppp secret set [/ppp secret find where profile="0400kbps not paid"] profile="to be deleted 0400"
/ppp secret set [/ppp secret find where profile="0800kbps not paid"] profile="to be deleted 0800"
/ppp secret set [/ppp secret find where profile="1000kbps not paid"] profile="to be deleted 1000"
/ppp secret set [/ppp secret find where profile="1200kbps not paid"] profile="to be deleted 1200"
/ppp secret set [/ppp secret find where profile="1500kbps not paid"] profile="to be deleted 1500"
/ppp secret set [/ppp secret find where profile="1600kbps not paid"] profile="to be deleted 1600"
/ppp secret set [/ppp secret find where profile="2000kbps not paid"] profile="to be deleted 2000"
/ppp secret set [/ppp secret find profile="0400kbps"] profile="0400kbps money"
/ppp secret set [/ppp secret find profile="0800kbps"] profile="0800kbps money"
/ppp secret set [/ppp secret find profile="1000kbps"] profile="1000kbps money"
/ppp secret set [/ppp secret find profile="1200kbps"] profile="1200kbps money"
/ppp secret set [/ppp secret find profile="1500kbps"] profile="1500kbps money"
/ppp secret set [/ppp secret find profile="1600kbps"] profile="1600kbps money"
/ppp secret set [/ppp secret find profile="2000kbps"] profile="2000kbps money"
}

Who is online

Users browsing this forum: No registered users and 8 guests