Hello Community,
I tried to setup cronjob for biometric-attendance-sync-tool
as below.
$ crontab -l
0 */6 * * * cd /home/sigma/frappe-bench && /usr/local/bin/bench --verbose --site all backup >> /home/sigma/frappe-bench/logs/backup.log 2>&1 # bench auto backups set for every 6 hours
* * * * * /usr/bin/python3 -c 'from erpnext_sync import main; main()'
This cronjob is not working when I am restarting PC and starting Ubuntu or Windows Terminal.
But when I run the script manually ( using commands source venv/bin/activate
and python3 erpnext_sync.py
in dir biometric-attendance-sync-tool
) and then stops the script using ctrl + Z
then cronjob works fine.
May I know How to run this cronjob perfectly when I restart computer.