forked from elearning-ostfalia/Proforma-Praktomat
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcron.conf
29 lines (18 loc) · 1.15 KB
/
cron.conf
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
SHELL=/bin/bash
PATH=/bin:/usr/local/bin:usr/bin
# todo: read folder name from environment variable
# delete files from upload folder
@midnight echo cron > /proc/1/fd/1 2>/proc/1/fd/2
#* * * * * echo cron > /proc/1/fd/1 2>/proc/1/fd/2
# solution files (keep for 7 days)
@midnight /usr/bin/find /praktomat/data/SolutionArchive/* -mtime +7 -exec rm -rf {} \; > /proc/1/fd/1 2>/proc/1/fd/2
#* * * * * /usr/bin/find /praktomat/data/SolutionArchive/* -mmin +1 -exec rm -rf {} \; > /proc/1/fd/1 2>/proc/1/fd/2
# keep until task is deleted
## files from task (keep for 2 days)
#@midnight /usr/bin/find /praktomat/data/CheckerFiles/* -mtime +2 -exec rm -rf {} \; > /proc/1/fd/1 2>/proc/1/fd/2
##* * * * * /usr/bin/find /praktomat/data/CheckerFiles/* -mmin +1 -exec rm -rf {} \; > /proc/1/fd/1 2>/proc/1/fd/2
# sandbox for student submission (keep for 7 days)
# (should be deleted immediately after check)
@midnight /usr/bin/find /praktomat/data/SolutionSandbox/* -mtime +7 -exec rm -rf {} \; > /proc/1/fd/1 2>/proc/1/fd/2
#* * * * * /usr/bin/find /praktomat/data/SolutionSandbox/* -mmin +1 -exec rm -rf {} \; > /proc/1/fd/1 2>/proc/1/fd/2
# do not delete this line