-
-
Notifications
You must be signed in to change notification settings - Fork 156
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
5f41645
commit bd579b7
Showing
4 changed files
with
92 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
import logging | ||
|
||
from django.core.management.base import BaseCommand | ||
|
||
# from django.core import management | ||
from django.utils import timezone | ||
|
||
logger = logging.getLogger(__name__) | ||
|
||
|
||
class Command(BaseCommand): | ||
help = "Runs commands scheduled to execute daily" | ||
|
||
def handle(self, *args, **options): | ||
try: | ||
logger.info(f"Starting daily scheduled tasks at {timezone.now()}") | ||
|
||
# Add commands to be executed daily | ||
# management.call_command('daily_command1') | ||
# management.call_command('daily_command2') | ||
except Exception as e: | ||
logger.error(f"Error in daily tasks: {str(e)}") | ||
raise |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
import logging | ||
|
||
from django.core.management.base import BaseCommand | ||
|
||
# from django.core import management | ||
from django.utils import timezone | ||
|
||
logger = logging.getLogger(__name__) | ||
|
||
|
||
class Command(BaseCommand): | ||
help = "Runs commands scheduled to execute hourly" | ||
|
||
def handle(self, *args, **options): | ||
try: | ||
logger.info(f"Starting hourly scheduled tasks at {timezone.now()}") | ||
|
||
# We can add hourly commands here | ||
# management.call_command('hourly_command1') | ||
# management.call_command('hourly_command2') | ||
except Exception as e: | ||
logger.error(f"Error in hourly tasks: {str(e)}") | ||
raise |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
import logging | ||
|
||
from django.core.management.base import BaseCommand | ||
|
||
# from django.core import management | ||
from django.utils import timezone | ||
|
||
logger = logging.getLogger(__name__) | ||
|
||
|
||
class Command(BaseCommand): | ||
help = "Runs commands scheduled to execute monthly" | ||
|
||
def handle(self, *args, **options): | ||
try: | ||
logger.info(f"Starting monthly scheduled tasks at {timezone.now()}") | ||
|
||
# Add commands to be executed monthly | ||
# management.call_command('monthly_command1') | ||
# management.call_command('monthly_command2') | ||
except Exception as e: | ||
logger.error(f"Error in monthly tasks: {str(e)}") | ||
raise |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
import logging | ||
|
||
from django.core.management.base import BaseCommand | ||
|
||
# from django.core import management | ||
from django.utils import timezone | ||
|
||
logger = logging.getLogger(__name__) | ||
|
||
|
||
class Command(BaseCommand): | ||
help = "Runs commands scheduled to execute weekly" | ||
|
||
def handle(self, *args, **options): | ||
try: | ||
logger.info(f"Starting weekly scheduled tasks at {timezone.now()}") | ||
|
||
# Add commands to be executed weekly | ||
# management.call_command('weekly_command1') | ||
# management.call_command('weekly_command2') | ||
except Exception as e: | ||
logger.error(f"Error in weekly tasks: {str(e)}") | ||
raise |