Is there a way to launch bitcoin-core and have it shut down when synchronized?
You could sleep for e.g. 10 minutes after you started bitcoind, and then  do the following:


bitcoin-cli getblockcount, which is the current height of the node
call getpeerinfo, parse the JSON, take the median of startingheight (how far these nodes are)
If difference &lt; 10, stop bitcoind with bitcoin-cli stop and exit
Sleep 1 minute, repeat 


Or use something like this to determine if the last known block is less than an hour old.