I tried using crontab but didn’t work. Also, do I need a nohup to keep it running after exit the SSH connection?
02 19 * * * /usr/bin python3.7 myScript.py
You have a couple of syntax errors there. First, if you want to run myScript.py with python3.7 which is in /usr/bin, then you need:
/usr/bin/python3.7 myScript.py
Next, you need to give the full path to the script. So if the script is in your home directory, use (change /home/marcelo/ to your actual home directory):
02 19 * * * /usr/bin/python3.7 /home/marcelo/myScript.py
And no, you don't need nohup or anything else. This won't be connected to your ssh session in any way.
Finally, it is more common to use shebangs for this sort of thing. Just add this line as the first line of your script:
#!/usr/bin/python3.7
Then, make it executable (chmod +x /home/marcelo/myScript.py) and you can run your script directly:
02 19 * * * /home/marcelo/myScript.py
/usr/local/bin/python3.7