From 96baf8e5dcc8aabd105fda01a8644308eb0176da Mon Sep 17 00:00:00 2001 From: Alexey Golub Date: Wed, 12 Sep 2018 21:50:24 +0300 Subject: [PATCH] Updated Scheduling exports with Mono & Crontab (markdown) --- Scheduling-exports-with-Mono-&-Crontab.md | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/Scheduling-exports-with-Mono-&-Crontab.md b/Scheduling-exports-with-Mono-&-Crontab.md index dae5a70..aeed91e 100644 --- a/Scheduling-exports-with-Mono-&-Crontab.md +++ b/Scheduling-exports-with-Mono-&-Crontab.md @@ -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**