<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>cloud scheduler Archives - Big Data Processing</title>
	<atom:link href="https://bigdataproc.com/tag/cloud-scheduler/feed/" rel="self" type="application/rss+xml" />
	<link>https://bigdataproc.com/tag/cloud-scheduler/</link>
	<description>Big Data Solution for GCP, AWS, Azure and on-prem</description>
	<lastBuildDate>Wed, 22 Dec 2021 15:41:24 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.3.2</generator>
	<item>
		<title>Google Cloud Scheduler to Auto Shutdown Cloud SQL</title>
		<link>https://bigdataproc.com/google-cloud-scheduler-to-auto-shutdown-cloud-sql/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=google-cloud-scheduler-to-auto-shutdown-cloud-sql</link>
					<comments>https://bigdataproc.com/google-cloud-scheduler-to-auto-shutdown-cloud-sql/#respond</comments>
		
		<dc:creator><![CDATA[Gaurang]]></dc:creator>
		<pubDate>Tue, 21 Dec 2021 15:43:09 +0000</pubDate>
				<category><![CDATA[GCP]]></category>
		<category><![CDATA[cloud scheduler]]></category>
		<category><![CDATA[cloud sql]]></category>
		<category><![CDATA[gcp]]></category>
		<category><![CDATA[google]]></category>
		<guid isPermaLink="false">https://bigdataproc.com/?p=269</guid>

					<description><![CDATA[<p>automate shutting down cloud SQL instance using cloud scheduler.</p>
<div class="more-link-wrapper"><a class="more-link" href="https://bigdataproc.com/google-cloud-scheduler-to-auto-shutdown-cloud-sql/">Continue reading<span class="screen-reader-text">Google Cloud Scheduler to Auto Shutdown Cloud SQL</span></a></div>
<p>The post <a rel="nofollow" href="https://bigdataproc.com/google-cloud-scheduler-to-auto-shutdown-cloud-sql/">Google Cloud Scheduler to Auto Shutdown Cloud SQL</a> appeared first on <a rel="nofollow" href="https://bigdataproc.com">Big Data Processing </a>.</p>
]]></description>
										<content:encoded><![CDATA[
<p>Recently I started working on GCP, and for one of my POC I wanted cloud SQL.  As this was POC I did not want it to run 24&#215;7 and was trying to find a way to auto shutdown at a particular time to save cost.  I don&#8217;t think there is any in-built option for that. However, GCP cloud scheduler has an option to call http request at a scheduled interval.  This is good, as cloud SQL allows to have some management operation done through rest calls. </p>



<div class="wp-block-image"><figure class="aligncenter size-large is-resized"><img decoding="async" fetchpriority="high" src="https://bigdataproc.com/wp-content/uploads/2021/12/gcp_cloud_sql_auto_shutdown.png" alt="" class="wp-image-270" width="429" height="149" srcset="https://bigdataproc.com/wp-content/uploads/2021/12/gcp_cloud_sql_auto_shutdown.png 445w, https://bigdataproc.com/wp-content/uploads/2021/12/gcp_cloud_sql_auto_shutdown-300x104.png 300w" sizes="(max-width: 429px) 100vw, 429px" /></figure></div>



<h2 class="wp-block-heading">New I AM Service Account</h2>



<p>For Scheduler to successfully run shutdown operation, it needs to be associated with associated with a service account with proper roles. So let&#8217;s create a new service account. </p>



<ul><li> Navigate to  I am and then click on service account. You&#8217;re screen might look like this. </li></ul>



<div class="wp-block-image"><figure class="aligncenter size-large"><a href="https://bigdataproc.com/wp-content/uploads/2021/12/gcp_iam_service_account-1.png"><img decoding="async" width="564" height="612" src="https://bigdataproc.com/wp-content/uploads/2021/12/gcp_iam_service_account-1.png" alt="" class="wp-image-274" srcset="https://bigdataproc.com/wp-content/uploads/2021/12/gcp_iam_service_account-1.png 564w, https://bigdataproc.com/wp-content/uploads/2021/12/gcp_iam_service_account-1-276x300.png 276w" sizes="(max-width: 564px) 100vw, 564px" /></a></figure></div>



<ul><li>now let&#8217;s put some name and description. I normally put service at the start of the name, but it&#8217;s not necessary. </li><li>After this, we need to associate proper role to this account.  For this we are going to choose <strong>Clod SQL Admin</strong></li></ul>



<div class="wp-block-image"><figure class="aligncenter size-large"><img decoding="async" width="587" height="379" src="https://bigdataproc.com/wp-content/uploads/2021/12/gcp_iam_service_account_2-1.png" alt="" class="wp-image-285" srcset="https://bigdataproc.com/wp-content/uploads/2021/12/gcp_iam_service_account_2-1.png 587w, https://bigdataproc.com/wp-content/uploads/2021/12/gcp_iam_service_account_2-1-300x194.png 300w" sizes="(max-width: 587px) 100vw, 587px" /></figure></div>



<ul><li>For this purpose we don&#8217;t need to associate any user to this service account. </li></ul>



<div class="wp-block-image"><figure class="aligncenter size-large"><a href="https://bigdataproc.com/wp-content/uploads/2021/12/gcp_iam_service_account_3.png"><img decoding="async" loading="lazy" width="566" height="491" src="https://bigdataproc.com/wp-content/uploads/2021/12/gcp_iam_service_account_3.png" alt="" class="wp-image-273" srcset="https://bigdataproc.com/wp-content/uploads/2021/12/gcp_iam_service_account_3.png 566w, https://bigdataproc.com/wp-content/uploads/2021/12/gcp_iam_service_account_3-300x260.png 300w" sizes="(max-width: 566px) 100vw, 566px" /></a></figure></div>



<h2 class="wp-block-heading">New Scheduler </h2>



<ul><li>Navigate to scheduler and click on <strong>create job </strong>. And fill the name, description, frequency and Timezone. <br></li></ul>



<div class="wp-block-image"><figure class="aligncenter size-large"><a href="https://bigdataproc.com/wp-content/uploads/2021/12/gcp_scheduler_1.png"><img decoding="async" loading="lazy" width="563" height="702" src="https://bigdataproc.com/wp-content/uploads/2021/12/gcp_scheduler_1.png" alt="" class="wp-image-275" srcset="https://bigdataproc.com/wp-content/uploads/2021/12/gcp_scheduler_1.png 563w, https://bigdataproc.com/wp-content/uploads/2021/12/gcp_scheduler_1-241x300.png 241w" sizes="(max-width: 563px) 100vw, 563px" /></a></figure></div>



<ul><li>For this choose Target Type as HTTP.  Your url should be as mentioned below. <br><strong>URL</strong>: https://sqladmin.googleapis.com/v1/projects/project-id/instances/instance-id<br><strong>Method:</strong> Patch <br><strong>Auth Header:</strong>  Add OAuth Token <br><strong>Service Account:</strong>  service-mange-cloud-sql (one we created in above step, if your name is different please choose that) <br><strong>Body: </strong></li></ul>



<pre class="EnlighterJSRAW" data-enlighter-language="json" data-enlighter-theme="" data-enlighter-highlight="" data-enlighter-linenumbers="" data-enlighter-lineoffset="" data-enlighter-title="" data-enlighter-group="">{
  "settings": {
    "activationPolicy": "NEVER"
  }
}</pre>



<div class="wp-block-image"><figure class="aligncenter size-large"><a href="https://bigdataproc.com/wp-content/uploads/2021/12/gcp_scheduler_2.png"><img decoding="async" loading="lazy" width="565" height="785" src="https://bigdataproc.com/wp-content/uploads/2021/12/gcp_scheduler_2.png" alt="" class="wp-image-276" srcset="https://bigdataproc.com/wp-content/uploads/2021/12/gcp_scheduler_2.png 565w, https://bigdataproc.com/wp-content/uploads/2021/12/gcp_scheduler_2-216x300.png 216w" sizes="(max-width: 565px) 100vw, 565px" /></a></figure></div>



<ul><li>In the next step you can configure retry, I am keeping it default for simplicity. </li></ul>



<div class="wp-block-image"><figure class="aligncenter size-large"><a href="https://bigdataproc.com/wp-content/uploads/2021/12/gcp_scheduler_3.png"><img decoding="async" loading="lazy" width="569" height="697" src="https://bigdataproc.com/wp-content/uploads/2021/12/gcp_scheduler_3.png" alt="" class="wp-image-277" srcset="https://bigdataproc.com/wp-content/uploads/2021/12/gcp_scheduler_3.png 569w, https://bigdataproc.com/wp-content/uploads/2021/12/gcp_scheduler_3-245x300.png 245w" sizes="(max-width: 569px) 100vw, 569px" /></a></figure></div>



<ul><li>one successfully created you should be able to see your job on scheduler home page.  Here you can test your job as well. </li></ul>



<div class="wp-block-image"><figure class="aligncenter size-large is-resized"><a href="https://bigdataproc.com/wp-content/uploads/2021/12/gcp_scheduler_4-1.png"><img decoding="async" loading="lazy" src="https://bigdataproc.com/wp-content/uploads/2021/12/gcp_scheduler_4-1-1024x50.png" alt="" class="wp-image-280" width="645" height="31" srcset="https://bigdataproc.com/wp-content/uploads/2021/12/gcp_scheduler_4-1-1024x50.png 1024w, https://bigdataproc.com/wp-content/uploads/2021/12/gcp_scheduler_4-1-300x15.png 300w, https://bigdataproc.com/wp-content/uploads/2021/12/gcp_scheduler_4-1-768x38.png 768w, https://bigdataproc.com/wp-content/uploads/2021/12/gcp_scheduler_4-1-1536x76.png 1536w, https://bigdataproc.com/wp-content/uploads/2021/12/gcp_scheduler_4-1.png 1888w" sizes="(max-width: 645px) 100vw, 645px" /></a></figure></div>
<p>The post <a rel="nofollow" href="https://bigdataproc.com/google-cloud-scheduler-to-auto-shutdown-cloud-sql/">Google Cloud Scheduler to Auto Shutdown Cloud SQL</a> appeared first on <a rel="nofollow" href="https://bigdataproc.com">Big Data Processing </a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://bigdataproc.com/google-cloud-scheduler-to-auto-shutdown-cloud-sql/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
	</channel>
</rss>
