$ sudo crontab -l
37 * * * * source /home/jmkim/dms-bi/bi_venv/bin/activate && python /home/jmkim/dms-bi/run.py >> /home/jmkim/test.log 2>&1
I registered it on crontab. However, the execution did not continue, so I looked at the service cron status.
Oct 08 01:37:01 spark-master CRON[119498]: (root) CMD (source /home/jmkim/dms-bi/bi_venv/bin/activate && python /hon /houn/jim/rmans.py >> /home/jmkim/test.log 2>&1)
Oct 08 01:37:01 spark-master CRON[119491]: pam_unix(cron:session): session closed for user root
It came out like this. I don't know if it's session closed and it's not working.
Why doesn't the execution you ordered work?
Direct command of /usr/bin/python/home/username/run.py
will run normally.
The user name is source.
To set the execution of a specific user with sudo crotab-e
, specify it as follows.
37 * * * * su source -c "/home/jmkim/dms-bi/bi_venv/bin/activate && python /home/jmkim/dms-bi/run.py >> /home/jmkim/test.log 2>&1"
536 Unable to install versioned in Google Colab
539 rails db:create error: Could not find mysql2-0.5.4 in any of the sources
544 Who developed the "avformat-59.dll" that comes with FFmpeg?
538 PHP ssh2_scp_send fails to send files as intended
639 When building Fast API+Uvicorn environment with PyInstaller, console=False results in an error
© 2024 OneMinuteCode. All rights reserved.