Updated Scheduling exports with Mono & Crontab (markdown)

Alexey Golub
2018-09-12 21:50:24 +03:00
parent a35aee7856
commit 96baf8e5dc

@@ -24,10 +24,8 @@ if [[ "$TOKENTYPE" == "BOT" ]]; then
ISBOTYES=-b
fi
PATH=/Library/Frameworks/Mono.framework/Versions/Current/bin/:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin
CURRENTTIME=`date +"%Y-%m-%d-%H-%M-%S"`
mono DiscordChatExporter.Cli.exe -t $TOKEN $ISBOTYES -c $CHANNEL -f $EXPORTFORMAT -o exporttmp
CURRENTTIME=`date +"%Y-%m-%d-%H-%M-%S"`
if [[ "$EXPORTFORMAT" == "PlainText" ]]; then
mv "exporttmp" $EXPORTDIRECTORY/$FILENAME-$CURRENTTIME.txt
@@ -62,7 +60,7 @@ exit
**5.** Add a new job to crontab using `sudo crontab e`
**6.** Add `* * * * * /path/to/DiscordChatExporter/cron.sh >/tmp/discordexporter.log 2>/tmp/discordexportererror.log` to the end of the file.
**6.** Add `* * * * * /path/to/DiscordChatExporter/cron.sh` to the end of the file.
Replace the *s according to:
@@ -75,8 +73,6 @@ Week starts on Sunday. 0 = SUN, 1 = MON...
Filename date format is YYYY-MM-DD-hh-mm-ss.
The cron file is located at `/usr/lib/cron/tabs` on macOS, and at `/var/spool/cron/crontabs` on Linux, but should always be edited with `crontab -e`.
#
**Examples**