I have created a binary file from a Go script, and now I need to run it with crontab. The binary file runs without issues executing it manually from the command line. I am using Ubuntu from WSL.
Crontab saves successfully, but it seems the script does not execute.
Cronjob looks like this:
*/1 01 * * * /home/tgr/test-bin/main/main -download > /dev/null 2>&1
- I was testing this at 1 AM, that is why the crontab hour field is in 01.
Running the script with “-download” flag, tries to download some files from a bucket, using a YAML config file, then makes some secondary tasks like decompression, copying and verifying the structure of the files. It produces a log file too.
I have already started cron service with
sudo service cron start
Could you please advise?