I am newbi in amazon ec2 as well as linux,

I am working on pentaho kettle, for starting my job process i m using following command in amazon ec2 instance,

cd /dev/pdi/data-integration (reaching to specific directory)

screen (the process which never die so using screen for this)

./kitchen.sh -file="/dev/pdi/pdi_transformations_jobs/capella_job.kjb" -param:ROUTE_TO_LOG="/dev/logs/capellajobOutput.log" (for starting batch file)

Now i want to do something like i want to start my ec2 instance as well as job process at particular given time.

i can write a cron script for this but i read some-where that amazon ec2 instance does-not support cron , am i right?

i am putting above 3 commands in 1 .sh file and trying to create a similar file like batch file so that it automatically executes all three command, but i am getting error like " no such file or directory and command not found "

so can somebody explain me what is wrong and how to achieve a particular thing what i suppose to do.

closed as off-topic by user9517 supports GoFundMonica, Andrew, MadHatter supports Monica, Sven, Falcon Momot May 6 '14 at 8:01

This question appears to be off-topic. The users who voted to close gave this specific reason:

  • "Questions must demonstrate a minimal understanding of the problem being solved. Try including attempted solutions, why they didn't work, and the expected results. See How can I ask better questions on Server Fault? for further guidance." – user9517 supports GoFundMonica, Andrew, MadHatter supports Monica, Sven, Falcon Momot
If this question can be reworded to fit the rules in the help center, please edit the question.

  • 1
    There are too many cumulative fundamental errors here for us to help you. Perhaps for starters you should look at nohup, as well as the differences between the various base AMIs in EC2. – Falcon Momot May 6 '14 at 8:04
  • First, EC2 should support cron. If you are unsure, why don't you just test it?

  • Second, to run a script it needs to have execute permissions and need to be either in your path or is called with the full file name, including location. See man chmod.

  • Third, just calling screen inside a script and then expect the following command to run inside a screen session does not work.

  • You dont want to repeatedly (e.g via cron) run a job that is supposed to never end - you'll end with very many of those and quickly your system will overload.

  • I don't know Pentaho kettle, but if /dev/ is supposed to be a directory for development files, don't use this name, it's reserved for device files, something very important for Unix/Linux and you should never use if for something else.

In the end, I am unsure what you really want to accomplish. Is this kitchen.sh script supposed to run permanently? In that case, you don't need (and never should) try to run it via any timed method like cron, but need to put it into an init script and start it together with the system, maybe with some kind of watchdog checking up on this thing.

  • i executed the crontab -e opened one file as i was not that familiar with cron i closed crontab then message displayed installing cron, so get confused that what went wrong. yes i want to start my ec2 instance and kitchen.sh at some given time as well as second script which stops the same, o 6 *** filename will execute my script for starting kitchen.sh but what script i have to writ for stating ec2 instance if it is stop. – Working Hard.. May 6 '14 at 7:41
  • before executing ./filename.sh i changed the permission but still getting permission error – Working Hard.. May 6 '14 at 7:43

Not the answer you're looking for? Browse other questions tagged or ask your own question.