- Newest
- Most votes
- Most comments
Are you able to see the task created in the scheduled task? And what is the trigger for this scheduled task, only at startup or at startup and every 5 minutes there after. If you are running this task only at startup, it will not run because the startup phase has already passed but there is an option to add a delay which delays the task execution by specified time after startup I believe.
Also as far as I remember scheduled tasks persist after sysprep but I will need to double check this. I would recommend creating a support case for investigation.
Thank you for sharing the details. I will find some time to test it. However, syncing every 2 minutes doesn't seem to be a good idea if the files are big. It can take some time to upload/download the file between S3 and the fleet instance. If you don't configure the schedule task correctly, there may be to many tasks running in parallel which may cause performance issues. As for the case that you opened, I was not able to find it. Please ask the engineer owning the case to contact me by sharing this repost article on the case and I will work with him internally to find the solution.
Hi Mayank, I am the engineer on this. My name is Sam and I can be reached as shsamuelhageman@gmail.com. The files were are operating with here are limited to csv files. Each csv file is 1-2 mb.
Relevant content
- asked 10 months ago
- asked a year ago
- AWS OFFICIALUpdated 7 months ago
- AWS OFFICIALUpdated a year ago
- AWS OFFICIALUpdated 7 months ago
Hi Mayank, thanks for your attention. I am creating the task to run every 2 minutes. But I am open to scrutiny on the script. I did open a case with AWS. They said it falls under the customer responsibility. And I don't think AppStream will allow any different type of sysprep using the Image Builder.
This is the script I have running in the Appstream config. Again, it doesn't appear to do what I would expect and I don't see it listed in task scheduler or in Get-ScheduledTask once the AppStream image is created.
$ac = New-ScheduledTaskAction -Execute '"%SystemRoot%\system32\WindowsPowerShell\v1.0\powershell.exe' -Argument ('-File "C:\scripts\syncin1.ps1"') $tr = New-ScheduledTaskTrigger -Once -At (Get-Date) -RepetitionInterval (New-TimeSpan -Minutes 2) $sa = New-ScheduledTaskSettingsSet -Hidden $pr = New-ScheduledTaskPrincipal -UserID 'NT AUTHORITY\SYSTEM' -LogonType ServiceAccount -RunLevel Highest Register-ScheduledTask -TaskName 'SyncinTask' -Trigger $tr -Action $ac -Settings $sa -Principal $pr