EasyManuals Logo

MikroTik RouterOS v2.9 User Manual

MikroTik RouterOS v2.9
709 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Page #660 background imageLoading...
Page #660 background image
Property Description
last-started ( time ) - date and time when the script has been last invoked. The argument is shown
only if the run-count!=0.
owner ( name ; default: admin ) - the name of the user who created the script
policy ( multiple choice: ftp | local | policy | read | reboot | ssh | telnet | test | web | write ; default:
reboot,read,write,policy,test ) - the list of the policies applicable:
• ftp - user can log on remotely via ftp and send and retrieve files from the router
• local - user can log on locally via console
• policy - manage user policies, add and remove user
• read - user can retrieve the configuration
• reboot - user can reboot the router
• ssh - user can log on remotely via secure shell
• telnet - user can log on remotely via telnet
• test - user can run ping, traceroute, bandwidth test
• web - user can log on remotely via http
• write - user can retrieve and change the configuration
run-count ( integer ; default: 0 ) - script usage counter. This counter is incremented each time the
script is executed. The counter will reset after reboot.
source ( text ; default: "" ) - the script source code itself
Command Description
run ( name ) - executes a given script ( name ) - the name of the script to execute
Notes
You cannot do more in scripts than you are allowed to do by your current user rights, that is, you
cannot use disabled policies. For example, if there is a policy group in /user group which allows
you ssh,local,telnet,read,write,policy,test,web and this group is assigned to your user name, then
you cannot make a script that reboots the router.
Example
The following example is a script for writing message "Hello World!" to the info log:
[admin@MikroTik] system script> add name="log-test" source={:log info "Hello World!"}
[admin@MikroTik] system script> run log-test
[admin@MikroTik] system script> print
0 name="log-test" owner="admin"
policy=ftp,reboot,read,write,policy,test,winbox,password last-started=mar/20/2001
22:51:41
run-count=1 source=:log info "Hello World!"
[admin@MikroTik] system script>
Task Management
Page 646 of 695
Copyright 1999-2007, MikroTik. All rights reserved. Mikrotik, RouterOS and RouterBOARD are trademarks of Mikrotikls SIA.
Other trademarks and registred trademarks mentioned herein are properties of their respective owners.

Table of Contents

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the MikroTik RouterOS v2.9 and is the answer not in the manual?

MikroTik RouterOS v2.9 Specifications

General IconGeneral
BrandMikroTik
ModelRouterOS v2.9
CategorySoftware
LanguageEnglish