def METHOD_NAME():
	pendencies = Pendencies.objects.filter(Q(begin_date__date__lte = timezone.now()) & Q(resource__visible = True) & (Q(end_date__date__gte = timezone.now()) | (Q(limit_date__isnull = False) & Q(limit_date__date__gte = timezone.now())) | Q(limit_date__isnull = True)))
	for pendency in pendencies:
		users = get_resource_users(pendency.resource)
		subject_begin_date = pendency.resource.topic.subject.init_date
		pend_action = pendency.action
		resource_type = pendency.resource._my_subclass
		resource_key = resource_type + "_id"
		resource_id = pendency.resource.id
		for user in users:
			prev_notify = Notification.objects.filter(user = user, task = pendency).order_by("-creation_date")
			notify_type = 1
			meta = None
			if prev_notify.count() > 0:
				last_notify = prev_notify[0]
				if last_notify.creation_date == date.today():
					continue
				if last_notify.meta:
					if last_notify.creation_date < date.today() < last_notify.meta.date():
						continue
					meta = last_notify.meta
					notify_type = 2
			if not PendencyDone.objects.filter(pendency = pendency, student = user).exists():
				if pendency.end_date:
					if timezone.now() > pendency.end_date:
						notify_type = 3
				if pendency.limit_date:
					if timezone.now() > pendency.limit_date:
						notify_type = 4
				notification = Notification()
				notification.user = user
				notification.level = notify_type
				notification.task = pendency
				notification.meta = meta
				notification.save()
	notificate()