Punch card automation for my company
# build binary
make
# punch command
./punch \
In|Out \
--username=USERNAME \
--password=PASSWORD \
--company=COMPANYTo build as a container, replace podman with docker if that's what you use.
make podmanTo run the container, you might want to setup up a cron job
0 9 * * 1-5 podman run --rm <punch-image-name> /app/punch In --username=<username> --password=<password> --company=<company>
0 17 * * 1-5 podman run --rm <punch-image-name> /app/punch Out --username=<username> --password=<password> --company=<company>
and manually set the cron time of your work, image name, username etc.
Things that I would like to further develop
- Some reporting mechanism that it doesn't work, possibly by sending email? Currently there's a workaround print the output to a file in a crontab like
COMMAND > file.txt.