Python virtual environments are self-contained directory trees that contain a Python installation for a particular version of Python, plus a number of additional packages.
Let's say your script uses the "requests" package to make HTTP requests. If you installed requests in a virtual environment, then you will need to make sure the virtual environment is active when your script runs from cron. Otherwise you will get ImportError: No module named requests
.
On the other hand, if you installed requests system-wide, and are not using virtual environments, then you also don't need to worry about them in cron context.
Here's what I would do to troubleshoot your particular problem: I would add logging statements in in the script to check assumptions and hypotheses: does the script start at all? Does it run fully? If it makes HTTP requests, what HTTP statuses is it getting back?
Perhaps the script throws an exception, but the exception doesn't get logged anywhere. This snippet only captures stdout:
* * * * * /path/to/python3.8 /path/to/script/Script.py >> log.txt
Change it to also capture stderr:
* * * * * /path/to/python3.8 /path/to/script/Script.py >> log.txt 2>&1