# Commands (cmd) on Hosts not running

**URL:** <https://forum.p4.org/t/commands-cmd-on-hosts-not-running/614>\
**Category:** Getting Started with P4\
**Created:** [January 22, 2023, 5:25am UTC](https://forum.p4.org/t/commands-cmd-on-hosts-not-running/614 "2023-01-22T05:25:17Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![christnp](https://avatars.discourse-cdn.com/v4/letter/c/59ef9b/32.png) [@christnp](https://forum.p4.org/u/christnp)\
**Post date:** [January 22, 2023, 5:25am UTC](https://forum.p4.org/t/commands-cmd-on-hosts-not-running/614/1 "2023-01-22T05:25:17Z")

</div>

Good Evening,

It could be that I misunderstand the function of the “cmd” field in the p4App.json file when using the switch target; however, when I set the “cmd” to a valid script file (one that I run manually without issue), the command does not run when the p4App container launches. Instead, it seems to run when I exit the mininet session…

Is there a way to have a script run at startup using the available p4App tools? (I could probably put something into the dockerfile, but I’d rather not hard code the solution.

I appreciate any advice on this topic!

R/
