Script fails to start and hangs

Hello
I had a RB1100AHx2 with 6.17 and a script set to run on startup.


Everything was fine.

I upgraded it with a CCR1009, the problem appears both on 6.17 then with 6.24, and script fail to load.

17:44:05 script,error script error: action timed out - try again, if error continues contact MikroTik support and send a supout file (13)

the job appears to be stuck.

What I need to do to resolve the problem is to KILL the job and manually start the script.

Can I set it to run 5Min AFTER startup?

thank you

paste the script line by line - and se where the erros is.

/system script
add name=Verifica_QOS policy=ftp,reboot,read,write,policy,test,password,sniff,sensitive source=“/queue simple; :foreach i in=[find] \\r
\ndo={ \\r
\n:local sqName; \\r
\n:set sqName [get $i name]; \\r
\n:local sqLevel; \\r
\n:set sqLevel [:find $sqName "BASE-R"]; \\r
\n:if ($sqLevel >= 0) do={ \\r
\n :local dwBytes; \\r
\n :local startb; \\r
\n :local endb; \\r
\n :local stringBytes; \\r
\n :set stringBytes [get $i bytes]; \\r
\n :set startb [:find $stringBytes "/" -1]; \\r
\n :set endb [:len $stringBytes]; \\r
\n :set dwBytes [:pick $stringBytes ($startb + 1) $endb ]; \\r
\n :if ($dwBytes > 104857600) do={ \\r
\n set $i max-limit=256K/2M; \\r
\n }; \\r
\n } \\r
\nelse={ \\r
\n :set sqLevel [:find $sqName "PLUS-R"]; \\r
\n :if ($sqLevel >= 0) do={ \\r
\n :local dwBytes; \\r
\n :local startb; \\r
\n :local endb; \\r
\n :local stringBytes; \\r
\n :set stringBytes [get $i bytes]; \\r
\n :set startb [:find $stringBytes "/" -1]; \\r
\n :set endb [:len $stringBytes]; \\r
\n :set dwBytes [:pick $stringBytes ($startb + 1) $endb ]; \\r
\n :if ($dwBytes > 104857600) do={ \\r
\n set $i max-limit=512K/4M; \\r
\n } \\r
\n } \\r
\n else={ \\r
\n :set sqLevel [:find $sqName "BASE-B"]; \\r
\n :if ($sqLevel >= 0) do={ \\r
\n :local dwBytes; \\r
\n :local startb; \\r
\n :local endb; \\r
\n :local stringBytes; \\r
\n :set stringBytes [get $i bytes]; \\r
\n :set startb [:find $stringBytes "/" -1]; \\r
\n :set endb [:len $stringBytes]; \\r
\n :set dwBytes [:pick $stringBytes ($startb + 1) $endb ]; \\r
\n :if ($dwBytes > 104857600) do={ \\r
\n set $i max-limit=512K/2M; \\r
\n } \\r
\n } \\r
\n else={ \\r
\n :set sqLevel [:find $sqName "STANDARD-B"]; \\r
\n :if ($sqLevel >= 0) do={ \\r
\n :local dwBytes; \\r
\n :local startb; \\r
\n :local endb; \\r
\n :local stringBytes; \\r
\n :set stringBytes [get $i bytes]; \\r
\n :set startb [:find $stringBytes "/" -1]; \\r
\n :set endb [:len $stringBytes]; \\r
\n :set dwBytes [:pick $stringBytes ($startb + 1) $endb ]; \\r
\n :if ($dwBytes > 104857600) do={ \\r
\n set $i max-limit=512K/4M; \\r
\n } \\r
\n } \\r
\n } \\r
\n } \\r
\n} \\r
\n}”



Now I put back again 6.17 from 6.24 and it works correctly.
The script is fine. The bug is on the CCR