I want to post JSON string with HttpURLConnection api to the localhost server(WAMP) periodically every 60 seconds to be inserted in the database. Therefore, I am executing MyAs
Personally, i would use the alarm manager. That's what its for.
It is none of my business, but you should keep in mind that a request over the internet once every minute will drain your battery.