-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathexample-cronjob.txt
50 lines (44 loc) · 2.38 KB
/
example-cronjob.txt
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
# modify the address below to send alert emails to the desired email destination
# Edit this file to introduce tasks to be run by cron.
#
# Here is a good resource if you haven't worked with cron jobs before:
# www.unixgeeks.org/security/newbie/unix/cron-1.html
#
# Each task to run has to be defined through a single line
# indicating with different fields when the task will be run
# and what command to run for the task
#
# To define the time you can provide concrete values for
# minute (m), hour (h), day of month (dom), month (mon),
# and day of week (dow) or use '*' in these fields (for 'any').#
# Notice that tasks will be started based on the cron's system
# daemon's notion of time and timezones.
#
# Output of the crontab jobs (including errors) is sent through
# email to the user the crontab file belongs to (unless redirected).
#
# For example, you can run a backup of all your user accounts
# at 5 a.m every week with:
# 0 5 * * 1 tar -zcf /var/backups/home.tgz /home/
#
# For more information see the manual pages of crontab(5) and cron(8)
#
# this job runs at 5 minutes after the hour, every hour
# Since the default setting in local.py is to capture 3 minutes after the end of the
# show, and many shows end on the hour, the jobs runs two minutes after that
5 * * * * python [put autocharlie folder here]/HourlyCron.py >> [put log destination here]/hourly_log.txt 2>&1
# The following job's purpose is to load any updates to the weekly schedule
# An update to the radio station's spinitron schedule by an admin via the
# Spinitron admin console will not be registered by AutoCharlie until the
# next WeeklyCron job is run
# (this job runs every morning at 4:30am, Monday to Friday
30 04 * * 1,2,3,4,5 python [put autocharlie folder here]/WeeklyCron.py >> [put log destination here]/weekly_log.txt 2>&1
# below is an example of a side job for creating an audio archive in a
# non-standard destination
17 12 * * 1,2,3,4,5 python [put autocharlie folder here]/SideJobs/example-side-job-cron.py >> [put autocharlie destination here]/side_job.txt 2>&1
# NOTE: AutoCharlie is CPU intensive, due to the ability of sox to use up
# 100% of CPU for minutes on end. SO BEWARE, and do not run multiple
# instances of AutoCharlie concurrently. Based on experience with a
# virtual machine with one CPU allocated, multiple processes running
# sox simultaneously can crash