If you like to run it as a background job, you have to write a separate script that calls the app with runApp. So you write the app as you normally would (don't set any options), then write another script (that you submit as the job) that calls the app with the specific host and port settings like this:
#The path is to the folder, not the app file (app should be called app.R or server.R/ui.R)
runApp("pathToShinyAppFolder/", launch.browser = T, host = "127.0.0.1", port = 1234)
This app is hosted on your local machine, so any other IP you set apart from your own won't work I think. As noted in the documentation:
To allow other clients to connect, use the value "0.0.0.0" instead.
Hope this helps,