A simple script to automatically claim rewards from the popular gambling website Chumba Casino.
-
Clone the repository
-
Within the repository, create the following file:
users.json
-
Within
users.json
, provide the login(s) in JSON format like so:
{
"users": [
{"email": "[email protected]","password": "PASSWORD"},
{"email": "[email protected]","password": "PASSWORD"},
{"email": "[email protected]","password": "PASSWORD"}
]
}
Done! Feel free to cargo run
and watch the script go.
Below are optional steps for the following:
- Navigate into the repository
cd /path/to/cloned/repository
- Build the docker image and name it "chumba-claim-daily".
docker build -t chumba-claim-daily .
- Run the docker image
docker run --rm chumba-claim-daily:latest
Voila! Docker will create and run a container with the script running inside.
There will be two sets of cron instructions:
- Cron job running the script directly on the host machine
- Cron job runnint the script within a docker container
Note
Both methods will utilize the crontab of the host machine. The only difference is where the chumba-claim-daily script is executed.
- Open crontab
crontab -e
- Add the following to crontab to execute the script every day at 5am
0 5 * * * cd /path/to/cloned/repository && cargo run --release
Done! Every day at 5am, cargo run --release
will be executed within the repository's directory and run the script.
I have personally had issues with running docker commands from within crontab, so I create shell scripts containing the docker commands I need crontab to run.
- Create a shell script such as
docker-run.sh
and add
docker run --rm chumba-claim-daily:latest
- Open crontab
crontab -e
- Add the following to crontab to execute the script every day at 5am
0 5 * * * /bin/sh /path/to/shell/script/docker-run.sh
- Save changes and exit crontab
Done! Every day at 5am, the container will be created and run the script.