1

I am new to AutoSys. Need to run Shell script via AutoSys job by passing two arguments (filename & file location). Below are the shell script and the AutoSys JIL file. With this, it didn't work.

Please advise how to pass arguments to shell script from AutoSys JIL file.

Shell Script (job.sh):

 #!/bin/bash
 filename=$1
 filelocation=$2

 filepath=${filelocation}${filename}
 
 curl --insecure -X 'POST' -H 'Content-Type: application/json' \
 -H 'accept */*' \
 -d @$filepath \
 'https://portal/endpoint'

 echo "done"

AutoSys JIL File (job.jil):

 insert_job: JOB_START job_type: cmd
 description: conversion job
 machine: mymachine.net
 owner: ownerid
 max_run_alarm: 0
 alarm_if_fail: y
 send_notification: y
 envvars: ETL_HOME=/tmp/job/job1
 command: /tmp/job/job.sh file1 /tmp/files/
 
 
Vasanth Subramanian
  • 1,040
  • 1
  • 13
  • 32

0 Answers0