def METHOD_NAME():
	"""Will be triggered every 30 minutes"""
	# Get all ["Active", "Inactive"] sites
	# with auto updates scheduled
	sites_with_scheduled_updates = frappe.get_all(
		"Site",
		filters={
			"status": ("in", ("Active", "Inactive")),
			"auto_updates_scheduled": True,
			"bench": (
				"in",
				benches_with_available_update(),  # An update should be available for this site
			),
		},
		fields=[
			"name",
			"auto_update_last_triggered_on",
			"update_trigger_time",
			"update_trigger_frequency",
			"update_on_weekday",
			"update_end_of_month",
			"update_on_day_of_month",
		],
	)
	trigger_for_sites = list(filter(should_update_trigger, sites_with_scheduled_updates))
	for site in trigger_for_sites:
		auto_update_log = frappe.get_doc(
			{
				"doctype": "Scheduled Auto Update Log",
				"document_type": "Site",
				"document_name": site.name,
				"status": "Success",
			}
		)
		# Set the frequency details in log
		set_schedule_details(auto_update_log, site)
		try:
			site_doc = frappe.get_doc("Site", site.name)
			site_doc.schedule_update()
			site_doc.auto_update_last_triggered_on = now_datetime()
			site_doc.save()
		except Exception:
			traceback = "<pre><code>" + frappe.get_traceback() + "</pre></code>"
			# Update log doc
			auto_update_log.status = "Failed"
			auto_update_log.error = traceback
			log_error("Scheduled Auto Update Failed", site=site, traceback=traceback)
		finally:
			auto_update_log.insert(ignore_permissions=True)