1

I have three commands that i want to run in a sequence but in three separate terminal windows after boot up.

currently, I open first window,run the command and then run another terminal window, run a command and then finally the third terminal window and run the final command on it.

since, i have to wait for the process to complete after each command, the second and third window should open after, let us say 1 minute wait.

is there a way to run this using an auto run batch process after boot? many thanks. marc

1 Answer 1

0

You can set cron to run a script/command during system startup

make the below entry in crontab -e

@reboot <path to script file/command> 

You can also give multiple commands they will run in sequence

@reboot firstCommand;secondCommand;thirdCommand
4
  • QQ. will my command execute in three different terminal windows? after execution, these terminal windows should remain open. if one of them closes, then the dependent processes would stop.
    – marc Katz
    Jun 27, 2017 at 17:08
  • No, It will run in same terminal once a command will complete and exit other command will start executing. If your command will keep running occupying the shell then the next command will not run.
    – Sourav
    Jun 27, 2017 at 17:14
  • ok. thanks. I am looking for a solution where commands can execute in three new terminal windows one after the other and windows remain open after command execution.
    – marc Katz
    Jun 27, 2017 at 17:17
  • You can also set multiple cron with @reboot statement if sequence is not important for example: @reboot firstCommand @reboot secondCommand @reboot thirdCommand
    – Sourav
    Jun 27, 2017 at 17:26

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .