This is a tool for Freedomer to auto-punch.
export USER="username"
export USERPWD="userpwd"
go run main.go
docker pull wpted/fds_punch
docker run -e USER='username' -e USERPWD='userpwd' wpted/fds_punch
- Create shell script(myjob.sh) to run image
docker run -e USER='username' -e USERPWD='userpwd' wpted/fds_punch
- Make the script executable by running the command
chmod +x myjob.sh
Set a custom cron
nano <mycronname>
Since the time zone how a virtual machine depends, check the machine time first
timedatectl
Then set the time that fits your requirement
# mycronname
0 9 * * 1-5 /path/to/run_image.sh // clock-in
0 18 * * 1-5 /path/to/run_image.sh // clock-out
- Trigger with crontab
crontab <mycronname>