You could write a script to wait until you can ping google like the one below. You'll need change it to call your program and then save it as for example WaitScript.ps1
Then change your task scheduler entry to call this script. In task scheduler make it:
Arguments: -executionpolicy bypass -file "C:\YourPath\WaitScript.ps1"
## Wait for Google
Write-Host "Waiting for Google..." -ForegroundColor "yellow"
} until (Test-Connection -ComputerName www.google.com -Quiet)
## Call your program