mirror of
https://github.com/Tyrrrz/DiscordChatExporter.git
synced 2026-03-02 13:13:41 +00:00
Updated Scheduling exports with Mono & Crontab (markdown)
@@ -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**
|
||||
|
||||
Reference in New Issue
Block a user