from coord.models import Traveller def nightly_check_active_status(): for traveller in Traveller.objects.all(): traveller.update_active_status()