cron fixes and simplifications

This commit is contained in:
Luke Smith
2020-02-09 08:57:52 -05:00
parent 39a8fb3f46
commit 4cb726546f
2 changed files with 10 additions and 8 deletions

2
bin/mw
View File

@ -290,7 +290,7 @@ choosecron() { ! pgrep cron >/dev/null && echo "No cron manager running. Install
read -r minnum
printf "\033[0m"
done
(crontab -l; echo "*/$minnum * * * * export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/$(id -u)/bus; export DISPLAY=:0; . \$HOME/.profile; $(type mailsync | cut -d' ' -f3)") | crontab - &&
(crontab -l; echo "*/$minnum * * * * $(type mailsync | cut -d' ' -f3)") | crontab - &&
echo "Cronjob added. Mail will sync every $minnum minutes. Be sure you have your cron manager running."
fi ;}