3

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.

Souda
  • 63
  • 4
  • That's strange. Not sure what would cause that. Do any of the suggestions in [this answer](https://stackoverflow.com/questions/60256901/crontab-never-executes-in-windows-subsystem-linux) provide helpful debugging info? – Nick ODell Dec 30 '21 at 17:57
  • Yes, I followed all the steps provided in the answer. It says that crontab is running but it still doesn't do anything. – Souda Dec 30 '21 at 18:56

0 Answers0