-
Notifications
You must be signed in to change notification settings - Fork 2
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
=
committed
Jul 7, 2024
1 parent
52131fa
commit 38f95d7
Showing
7 changed files
with
50 additions
and
21 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,20 @@ | ||
DEBUG='False' | ||
SECRET_KEY='secret' | ||
DATABASE_PASSWORD='secret' | ||
DATABASE_ROOT_PASSWORD="secret" | ||
EMAIL_USE_TLS='True' | ||
EMAIL_HOST='smtp.gmail.com' | ||
EMAIL_PORT='587' | ||
EMAIL_HOST_USER='[email protected]' | ||
EMAIL_HOST_PASSWORD='your gmail app password, not your gmail password' | ||
DEFAULT_FROM_EMAIL="Notifications <[email protected]>" | ||
SITE_DOMAIN="example.com" | ||
GOOGLE_MEASUREMENT_ID="G-abcde" | ||
GOOGLE_TAG_ID="GTM-abcde" | ||
GOOGLE_MAPS_API_KEY='secret' | ||
ADMIN_EMAIL='[email protected]' | ||
REDIS_PASSWORD='secret' | ||
GOOGLE_ADSENSE_ID='ca-pub-abcde' | ||
RECAPTCHA_PUBLIC_KEY='secret' | ||
RECAPTCHA_PRIVATE_KEY='secret' | ||
GOOGLE_OAUTH_LINK="secret.apps.googleusercontent.com" |
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
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
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
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 |
---|---|---|
@@ -1,33 +1,33 @@ | ||
# m h dom mon dow command | ||
# Set lots as ended and declare a winner | ||
* * * * * cd /home/user/python/auction_site_2022/ && /home/user/python/auction_site_2022/bin/python /home/user/python/auction_site_2022/fishauctions/manage.py endauctions >> /var/log/cron.log 2>&1 | ||
* * * * * /home/app/web/task.sh endauctions | ||
|
||
# Send reminder emails about watched items | ||
*/15 * * * * cd /home/user/python/auction_site_2022/ && /home/user/python/auction_site_2022/bin/python /home/user/python/auction_site_2022/fishauctions/manage.py sendnotifications >> /var/log/cron.log 2>&1 | ||
*/15 * * * * /home/app/web/task.sh sendnotifications | ||
|
||
# welcome and print erminder emails | ||
*/15 * * * * cd /home/user/python/auction_site_2022/ && /home/user/python/auction_site_2022/bin/python /home/user/python/auction_site_2022/fishauctions/manage.py auctiontos_notifications >> /var/log/cron.log 2>&1 | ||
*/15 * * * * /home/app/web/task.sh auctiontos_notifications | ||
|
||
# Email users about invoices | ||
*/15 * * * * cd /home/user/python/auction_site_2022/ && /home/user/python/auction_site_2022/bin/python /home/user/python/auction_site_2022/fishauctions/manage.py email_invoice >> /var/log/cron.log 2>&1 | ||
*/15 * * * * /home/app/web/task.sh email_invoice | ||
|
||
# Update leaderboard | ||
* 23 * * * cd /home/user/python/auction_site_2022/ && /home/user/python/auction_site_2022/bin/python /home/user/python/auction_site_2022/fishauctions/manage.py update_breederboard >> /var/log/cron.log 2>&1 | ||
* 23 * * * /home/app/web/task.sh update_breederboard | ||
|
||
# send email | ||
* * * * * cd /home/user/python/auction_site_2022/ && /home/user/python/auction_site_2022/bin/python /home/user/python/auction_site_2022/fishauctions/manage.py send_queued_mail >> /var/log/cron.log 2>&1 | ||
* * * * * /home/app/web/task.sh send_queued_mail | ||
|
||
# send auction emails | ||
*/4 * * * * cd /home/user/python/auction_site_2022/ && /home/user/python/auction_site_2022/bin/python /home/user/python/auction_site_2022/fishauctions/manage.py auction_emails >> /var/log/cron.log 2>&1 | ||
*/4 * * * * /home/app/web/task.sh auction_emails | ||
|
||
# send notifications about unread chats | ||
0 10 * * * cd /home/user/python/auction_site_2022/ && /home/user/python/auction_site_2022/bin/python /home/user/python/auction_site_2022/fishauctions/manage.py email_unseen_chats >> /var/log/cron.log 2>&1 | ||
0 10 * * * /home/app/web/task.sh email_unseen_chats | ||
|
||
# weekly promo email sent on Wednesday | ||
30 9 * * 3 cd /home/user/python/auction_site_2022/ && /home/user/python/auction_site_2022/bin/python /home/user/python/auction_site_2022/fishauctions/manage.py weekly_promo >> /var/log/cron.log 2>&1 | ||
30 9 * * 3 /home/app/web/task.sh weekly_promo | ||
|
||
# set user locations | ||
0 0 * * * cd /home/user/python/auction_site_2022/ && /home/user/python/auction_site_2022/bin/python /home/user/python/auction_site_2022/fishauctions/manage.py set_user_location >> /var/log/cron.log 2>&1 | ||
0 0 * * * /home/app/web/task.sh set_user_location | ||
|
||
# check for duplicate page views | ||
*/15 * * * * cd /home/user/python/auction_site_2022/ && /home/user/python/auction_site_2022/bin/python /home/user/python/auction_site_2022/fishauctions/manage.py remove_duplicate_views >> /var/log/cron.log 2>&1 | ||
*/15 * * * * /home/app/web/task.sh remove_duplicate_views |
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
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,14 @@ | ||
#!/bin/bash | ||
|
||
if [ $# -eq 0 ]; then | ||
echo "No argument provided, specify which script to run" >> /var/log/cron.log 2>&1 | ||
exit 1 | ||
fi | ||
|
||
if [ -f /home/app/web/.env ]; then | ||
export $(grep -v '^#' /home/app/web/.env | xargs) | ||
else | ||
echo "No .env file found, env will not be set" >> /var/log/cron.log 2>&1 | ||
fi | ||
|
||
/usr/local/bin/python /home/app/web/manage.py $1 >> /var/log/cron.log 2>&1 |