I'm trying to automate a task with python, but contrab seems to not work properly on my WSL2 environment. I've already manually turned it on using sudo service cron start
, and even though service cron status
says it is running, it still seems to not work.
To check it out, I've set it to run a simpler script every 2 minutes to see if it was an issue with python itself, but the issue persists. Below is my cron setting:
*/2 * * * * /home/viper/example.sh
and the actual code inside the bash script:
#!/bin/sh
echo "Hello World - Generated every 2 mins" >> ~/hello1.txt
I tried googling around any possible fixes but neither of them worked.