Spawn is a function that creates a new job process (child process) that inherits many attributes of the calling process (parent process). A new program is specified and starts running in the child process. When you spawn a batch job you are using a parent job to pass along arguments and environment variables to the child job. The spawn() API uses batch immediate jobs, prestart jobs, or prestart batch jobs.