# executed a script on log event

**URL:** <https://forum.mikrotik.com/t/executed-a-script-on-log-event/156718>\
**Category:** Scripting\
**Created:** [March 22, 2022, 4:35pm UTC](https://forum.mikrotik.com/t/executed-a-script-on-log-event/156718 "2022-03-22T16:35:35Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Uptel](https://forum.mikrotik.com/letter_avatar/uptel/32/6_449c533f586939b6e5f246632a46421f.png) [@Uptel](https://forum.mikrotik.com/u/Uptel)\
**Post date:** [March 22, 2022, 4:35pm UTC](https://forum.mikrotik.com/t/executed-a-script-on-log-event/156718/1 "2022-03-22T16:35:35Z")

</div>

Hello,

I am looking for a solution, when I have a specific line written in the logs is it possible to execute a script automatically?

Sincerely,  
ALEGRI Remy

---

<div class="post-metadata">

**Author:** ![Jotne](https://forum.mikrotik.com/user_avatar/forum.mikrotik.com/jotne/32/56097_2.png) [@Jotne](https://forum.mikrotik.com/u/Jotne)\
**Post date:** [March 24, 2022, 11:40am UTC](https://forum.mikrotik.com/t/executed-a-script-on-log-event/156718/2 "2022-03-24T11:40:03Z")

</div>

See my posts in this thread:  
[http://forum.mikrotik.com/t/black-list-for-failed-login-to-ipsec-vpn/130090/1](http://forum.mikrotik.com/t/black-list-for-failed-login-to-ipsec-vpn/130090/1)

It uses the log to block VPN users that do not have correct credentials.

---

<div class="post-metadata">

**Author:** ![rextended](https://forum.mikrotik.com/user_avatar/forum.mikrotik.com/rextended/32/67729_2.png) [@rextended](https://forum.mikrotik.com/u/rextended)\
**Post date:** [March 24, 2022, 5:15pm UTC](https://forum.mikrotik.com/t/executed-a-script-on-log-event/156718/3 "2022-03-24T17:15:58Z")

</div>

> [@](#):
>
> Hello,
> 
> I am looking for a solution, when I have a specific line written in the logs is it possible to execute a script automatically?
> 
> Sincerely,  
> ALEGRI Remy

Remember also do not run multiple time _until_ the same line is in the log…
