Reputation: 11
How can we create batch command for AzCopy. as I want to schedule this command. Please guide me how can I schedule this command. Currently I am manually running this command in 'Microsoft Azure Storage Tool' and want to automate.
Upvotes: 1
Views: 3568
Reputation: 1
Alternatively you can use Windows Task Scheduler to start powershell script which starts your batch file.
Powershell script contains only one line e.g.: Start-Process C:\foobar\azcopy.bat
Upvotes: 0
Reputation: 2206
As per my knowledge PS script containing azure powershell cmdlets cannot be scheduled by windows task scheduler. Probably it lacks something which cannot establish a connection to execute azure ps cmdlets through that script.
NOTE: Even if you schedule it it will execute the script, it will show status as completed; but it wont actually do its job.
I would recommend you to better go for azure runbooks for this task. Also you can use copyAzureStorageBlob
cmdlet for the same. Thanks.
Upvotes: 1
Reputation: 194
Schedule a PowerShell job to run azcopy.exe. See PowerShell scheduled jobs.
Upvotes: 1