Skip to content

Ec2Launch v2 Scheduled Task(Migration from Ec2Launch v1)

0

I used to write scheduled tasks scripts using the previous Ec2Launch v1(on Windows 2019) cmdlet

Register-ScriptScheduler

Now that I need to write Windows 2022 custom scheduled tasks i see that the AWS Powershell scripts are gone. I do see certain pre-baked tasks definitions https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2launch-v2-settings.html but i do not see a way to include scheduled tasks. I guess i should use the executeScript task definition and use basic Powershell to create the scheduled task. My final goal is to set a custom scheduled tasks to pre-register software back to their server side counter parts and not sure which stage to use.

asked 2 years ago363 views

1 Answer
0

You can still make use of EC2 Launchv2 to execute the script using "executeScript"

 

Note : It runs a script with optional arguments and a specified frequency. Script behavior depends on what mode the agent runs the scripts in – inline, or detached.

 

Output

All of the tasks write logfile entries to the agent.log file. Additional output from script that the executeScript task runs is stored separately in a dynamically named folder, as follows:

AWS

answered 2 years ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.