Be aware: Time specification "* * * * *" will run the command every
minute. It's useful for testing purposes, but can waste resources.

The script probably doesn't run because it probably needs a variable
which your user's crontab doesn't have set.

Since crontabs are designed to be executed/run even when the user isn't
paying attention to the computer, some variables are unset.

I once had a similar problem with GNUnet (which I installed from Guix),
and even though following the instructions that came with the README
file, the `gnunet-arm -s` crontab wouldn't run. Then I found out that it
needs the $USER variable to be set.

You can check which variables your crontab will run with by adding the
following line to your crontab:

* * * * * env > "env.txt"

Then wait a minute for an "env.txt" text file to appear in your user's
home (crontab always runs things from your user's home, unless told
otherwise), and you can comment that same crontab line now. Open the
"env.txt" to see which variables crontab is running your commands with.

In my case, I solved my problem with GNUnet by using this crontab line:

@reboot USER="adfeno" "/home/adfeno/.guix-profie/bin/gnunet-arm" -c
"$HOME/.config/gnunet.conf" -s

Reply via email to