Skip to content

Instantly share code, notes, and snippets.

@yanfeng42
Created January 11, 2022 01:58
Show Gist options
  • Save yanfeng42/0753dd7550fafa5bb723c3cd26dcba29 to your computer and use it in GitHub Desktop.
Save yanfeng42/0753dd7550fafa5bb723c3cd26dcba29 to your computer and use it in GitHub Desktop.
shell code for bot pomodoro
# step3.1
# check timedatectl
timedatectl
# change server timezone
sudo timedatectl set-timezone $timezone_you_need
# step3.2
# edit crontab to a new timer task
crontab -e
# add to crontab end.
0,25,30,55 * * * * $path_to_fab -f $path_to_fabfile bot_p > $path_to_log 2>&1
# step3.3
# run everty time, just for debug.
# * * * * * $path_to_fab -f $path_to_fabfile bot_p > $path_to_log 2>&1
# see task log
tail $path_to_log
# check cmd was real executed.
grep CRON /var/log/syslog
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment