User Cronjob does not work

I have created a cronjob to run Rsync. The permissions for the file that I am using for cronjob is as follows:

-rwxrwxr-x 1 root root 891 Sep 18 09:51 v-user-rsync-alldata

If I run it on the command line using “bash v-user-rsync-alldata”, it works as expected. However, when I added a cron job thru the HestiaCP to automate it, the cronjob did not run. Is there anything else that I am missing in setting up a new cronjob? The default cronjobs that come with HestiaCP installtion are working as expected.

1 Like

Use full path for example

sudo /usr/local/hestia/bin/v-update-letsencrypt-ssl

I have used this:

sudo /usr/local/usercron/v-user-rsync-alldata

admin user have only access to

sudo is limited to hestia scripts

admin ALL=NOPASSWD:/usr/local/vesta/bin/*
admin ALL=NOPASSWD:/usr/local/hestia/bin/*

Thank you.
I moved my files to /usr/local/hestia/bin/ and it’s working now.

1 Like

You could also add a line to /etc/sudoers.d/admin :slight_smile:

1 Like