skip to Main Content

I have scheduled EC2 instance to start every morning using Lambda. I have configured some task in task scheduler which I want it to run once EC2 is up however task wont get triggered until I login to EC2 instance. I want my task scheduler runs automatically at defined time without login to EC2 instance. Its a windows instance.

I tried configuring task without login but it doesn’t invoke.

2

Answers


  1. Did you choose the Run whether user is logged on or not option of the task?

    Fix Scheduled Task Won’t Run for .BAT File

    Next, you have to choose the Run whether user is logged on or not option

    Login or Signup to reply.
  2. To run a script every time an Amazon EC2 instance starts, simply add the script to this directory:

    /var/lib/cloud/scripts/per-boot/
    

    Most Amazon EC2 AMIs have cloud-init installed. It is responsible for running scripts from User Data. It will also check the above directory and run any scripts it finds there. This does not require a user to login.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search