-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathpython-cron
More file actions
55 lines (43 loc) · 3.62 KB
/
python-cron
File metadata and controls
55 lines (43 loc) · 3.62 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
# Example of job definition:
# .---------------- minute (0 - 59)
# | .------------- hour (0 - 23)
# | | .---------- day of month (1 - 31)
# | | | .------- month (1 - 12) OR jan,feb,mar,apr ...
# | | | | .---- day of week (0 - 6) (Sunday=0 or 7) OR sun,mon,tue,wed,thu,fri,sat
# | | | | |
# * * * * * Command
*/4 * * * * /app/venv/bin/python3 /app/manage.py run_monitor_checks >> /app/logs/run_monitor_checks.log 2>&1
*/4 * * * * /app/venv/bin/python3 /app/manage.py runcrons >> /app/logs/runcrons.log 2>&1
# Fresh Service Ticket Notification
*/4 * * * * /app/venv/bin/python3 /app/manage.py check_freshservices_for_new_tickets >> /app/logs/check_freshservices_for_new_tickets.log 2>&1
30 9 * * * /app/venv/bin/python3 /app/manage.py check_freshservices_for_oustanding_tickets >> /app/logs/check_freshservices_for_oustanding_tickets.log 2>&1
# Devops Reports
01 08 * * * /app/venv/bin/python3 /app/manage.py send_devops_reports >> /app/logs/devops_reports.log 2>&1
# Vulnerability Jobs
*/15 * * * * /app/venv/bin/python3 /app/manage.py rebuild_platform_packages >> /app/logs/rebuild_platform_packages.log 2>&1
15 12 * * * /app/venv/bin/python3 /app/manage.py update_github_dependabot >> /app/logs/update_github_dependabot.log 2>&1
15 0 * * * /app/venv/bin/python3 /app/manage.py update_github_dependabot >> /app/logs/update_github_dependabot.log 2>&1
05 10 * * * /app/venv/bin/python3 /app/manage.py update_vulnerabilities_db >> /app/logs/update_vulnerabilities_db.log 2>&1
05 11 * * * /app/venv/bin/python3 /app/manage.py get_python_package_list >> /app/logs/get_python_package_list.log 2>&1
05 13 * * * /app/venv/bin/python3 /app/manage.py check_for_vulnerable_packages >> /app/logs/check_for_vulnerable_packages.log 2>&1
05 07 * * * /app/venv/bin/python3 /app/manage.py check_for_vulnerable_packages >> /app/logs/check_for_vulnerable_packages.log 2>&1
10 9 * * 1 /app/venv/bin/python3 /app/manage.py vulnerable_system_packages_notification >> /app/logs/vulnerable_system_packages_notification.log 2>&1
# CVE metrics
30 09 * * * /app/venv/bin/python3 /app/manage.py update_cve_mitre_metrics >> /app/logs/update_cve_mitre_metrics.log 2>&1
30 13 * * * /app/venv/bin/python3 /app/manage.py update_cve_mitre_metrics >> /app/logs/update_cve_mitre_metrics.log 2>&1
# Ubuntu Vulnerabilities DB Update
15 7 * * 1 python manage.py update_ubuntu_vulnerabilities_db -a full >> /app/logs/update_ubuntu_vulnerabilities_db.log 2>&1
15 7 * * 4 python manage.py update_ubuntu_vulnerabilities_db -a full >> /app/logs/update_ubuntu_vulnerabilities_db.log 2>&1
*/4 * * * * python manage.py update_ubuntu_vulnerabilities_db >> /app/logs/update_ubuntu_vulnerabilities_db.log 2>&1
05 13 * * * /app/venv/bin/python3 /app/manage.py check_for_vulnerable_ubuntu_packages >> /app/logs/check_for_vulnerable_packages.log 2>&1
05 08 * * * /app/venv/bin/python3 /app/manage.py check_for_vulnerable_ubuntu_packages >> /app/logs/check_for_vulnerable_packages.log 2>&1
# NPM Vulnerabilities DB Update
10 7 * * * python manage.py update_npm_vulnerabilities_db >> /app/logs/update_npm_vulnerabilities_db.log 2>&1
30 7 * * * python manage.py update_npm_package_versions >> /app/logs/update_npm_package_versions.log 2>&1
30 8 * * * python manage.py check_for_vulnerable_npm_packages >> /app/logs/check_for_vulnerable_npm_packages.log 2>&1
# Rebuild Vulnerability Totals
1 9 * * * python manage.py rebuild_vuln_totals >> /app/logs/rebuild_vuln_totals.log 2>&1
55 12 * * * python manage.py rebuild_vuln_totals >> /app/logs/rebuild_vuln_totals.log 2>&1
30 04 * * * python manage.py rebuild_vuln_totals >> /app/logs/rebuild_vuln_totals.log 2>&1
# Log Rotate
1 0 * * * /bin/log_rotate.sh >> /app/logs/log_rotate.log 2>&1