Page 1 of 1

Scheduler / Script can't enable dude policy

Posted: Mon Feb 05, 2018 9:53 am
by derict
Hi,

I'm currently using script to take some data ARP from another routerOS that monitoring in dude.
using CLI like this
/dude ros arp find where device~"remote" && interface~"wlan1
works well if executed in terminal, but when moved to scheduler / script this script not running
sometimes this error log showed up
script,error script error: action timed out - try again, if error continues contact MikroTik support and send a supout file (13)
now I realize, policy for dude in scheduler / script can't be enabled
it's bug or something

Re: Scheduler / Script can't enable dude policy

Posted: Fri Jan 18, 2019 1:59 pm
by AceBlack
"now I realize, policy for dude in scheduler / script can't be enabled", anyone can explain, please?
Thanks

Re: Scheduler / Script can't enable dude policy

Posted: Mon Apr 01, 2019 3:36 pm
by krzych88
I have the same problem...

Re: Scheduler / Script can't enable dude policy

Posted: Wed Jul 31, 2019 5:57 pm
by floryluc
the problem persist on v6.45.2
any solution ?

Re: Scheduler / Script can't enable dude policy

Posted: Thu Jan 09, 2020 3:53 pm
by ryny24
I am unable to backup the dude (6.46.1 mmips). I have created a script, which works manually but fails by the scheduler.

02:00:00 script,error could not run script backup-dude-locally: not enough permissions
>  /system scheduler set policy=ftp,reboot,read,write,dude 0
But then 'dude' is missing from the policy list..
> /system scheduler print detail                            
Flags: X - disabled 
 0   name="Dude-Backup" start-date=jan/01/2020 start-time=02:00:00 interval=1d on-event=backup-dude-locally owner="admin" 
     policy=ftp,reboot,read,write run-count=1 next-run=jan/10 02:00:00 
The same thing happens via Winbox. I check and apply, but the check disappear.

Re: Scheduler / Script can't enable dude policy

Posted: Fri Jan 10, 2020 8:34 am
by macsrwe
I thought this sounded familiar…

The following is an excerpt from Ticket#2018041822002197, which I sent in about 20 months ago on 6.42rc…
I wrote up a script some time ago to run on our Dude server to save a backup of the Dude database, and scheduled it weekly. It has never run, so today I decided to see why.

The script ran fine if I triggered it by hand with the Run button. But the scheduler wouldn't run it. If I added a :log message at the beginning of the scheduler task, it would log, but nothing further would happen.

Eventually, I found several misbehaviors in ROS scripting and scheduling.

1) I saw that the Dude checkbox wasn't checked in the scheduler, so I checked it, thinking it was a permissions problem. When I hit the Apply button, the checkbox unchecked itself! It's like it's flipping me off. You cannot check this box and have it stay checked. As it turns out, this was not the cause of my problem, but it's a misbehavior.

2) The Dude checkbox also unchecks itself in the script, the same way. However, that doesn't seem to prevent it from running fine when I trigger it with the Run button.

3) Finally, I discovered the basic problem: the scheduler would not run the script if its contents were: script-name
…but it would run it fine if the contents were: /system script run script-name

Unfortunately, I have no idea what, if anything, support did with items #1 and #2. Perhaps nothing, since as #2 explained, the dude permission didn’t seem to be at all required to actually do dude stuff (at least at the time).

One thing to check: make sure the user you are logged in as has dude permission itself, otherwise you will not be able to set dude permission on scripts.

[EDIT]: Also, I should add, you should assume that the dude permission is not the one the error message is complaining about. Turn them all on, then turn them off bit by bit until the error comes back, then you’ve found the right one.