Is it safe to use crontab on a ERPNext server?

I have ERPNext deployed on a VPS host and would like to setup cron jobs for other server functions. I know that ERPNext and frappe use cron in a different sort of way and I just want to make sure that it is safe to use the regular crontab interface to setup jobs on the underlying Ubuntu server.

I don’t want to upset the delicate balance of the ERPNExt deployment if running crontab would interfere with anything.

Any help here?

BKM

As long as you’re dealing with non-ERPNext functions and dependencies, it should be fine. If you’re dealing with ERPNext functions and dependencies, then the answer will be “it depends”.

crontab is perfectly safe as either the frappe user, or any other user on the system.
you could also create a new user and run the cron jobs as that user .
As root, you can see what cronjobs exist for other users too with

crontab -l USERNAME

Appears command arguments are incorrect and command is “crontab -u frappe -l”

From the current Linux vm (or at least as of a couple months ago):

root@ubuntu:~# crontab -l frappe
crontab: usage error: no arguments permitted after this option
usage:  crontab [-u user] file
        crontab [ -u user ] [ -i ] { -e | -l | -r }
                (default operation is replace, per 1003.2)
        -e      (edit user's crontab)
        -l      (list user's crontab)
        -r      (delete user's crontab)
        -i      (prompt before deleting user's crontab)

but

root@ubuntu:~# crontab -u frappe -l
# job definition:
# .---------------- minute (0 - 59)
# | .------------- hour (0 - 23)
# | | .---------- day of month (1 - 31)
# | | | .------- month (1 - 12) OR jan,feb,mar,apr ...
# | | | | .---- day of week (0 - 6) (Sunday=0 or 7) OR sun,mon,tue,wed,thu,fri,sat
# | | | | |
# * * * * * user-name command to be executed
0 10 * * * cd /home/frappe/frappe-bench &&  /home/frappe/frappe-bench/env/bin/bench update --auto >> /home/frappe/frappe-bench/logs/auto_update_log.log 2>&1

# create erpnext backup daily at 03:00 (3am)
0 03 * * * cd /home/frappe/frappe-bench && /usr/local/bin/bench backup --with-files >> /home/frappe/frappe-bench/logs/crontab_backup_log.log 2>&1
root@ubuntu:~#

By the way, the first line in the frappe user crontab above is as the file was originally in the downloaded vm from erpnext.org. I tried copying and editing the line to create a daily backup, and found I had to change the bench invocation “/home/frappe/frappe-bench/env/bin/bench” to “/usr/local/bin/bench” for the backup to run.

I have left the original line as-is above, but I am correct to understand that the original “bench update” in the frappe user crontab never actually runs?

Cheers,
Dale