I’m just moving some sites from one Hestia server to another, using the backups. I noticed the cron is missing:
-- CRON --
2022-12-20 06:01:08 *** 0 jobs ***
Yet I can see it here:
crontab -l -u accounts
0 0 7 * * perl /home/accounts/web/xxxx.steampunk.com/public_html/cgi- bin/admin/import/import_fees.cgi
Is this a bug? Or do I need to enable cron backups? My own backup system has crons included (so at least they won’t get lost), but it’d be good if the backup .tar files also had them for restoration
Backup job needs to be entered trough hestia, it looks like you manualy edited the crontab file?
Oh, so you can’t edit the crons via
crontab -e -u xxxx ? I just assumed when it does the cron backups it just does a dump of the
UPDATE: Ah cool - I hadn’t even used / seen the cron function in the GUI. Also just noticed the CLI function to add them:
v-add-cron-job admin * * * * * sudo /usr/local/hestia/bin/v-backup-users
I’ll do that in the future
Is there any way to add rules with stuff like @daily?
I tried this, but it doesn’t seem to add:
v-add-cron-job admin @daily perl /installer/fix-templates.cgi >/dev/null 2>&1
In fact, this doesn’t work either:
v-add-cron-job admin 0 12 * * * perl /installer/fix-templates.cgi >/dev/null 2>&1
I even tried quoting it in case that was the problem:
v-add-cron-job admin 0 12 * * * 'perl /installer/fix-templates.cgi >/dev/null 2>&1'
What am I doing wrong?
use full path of perl, probaly /usr/bin/perl
still doesn’t like it:
v-add-cron-job admin 0 12 * * * /usr/bin/perl /installer/fix-templates.cgi >/dev/null 2>&1
How is the command argument grabbed? Is it just “joined” up from the remaining values, (after the username, h:m d/m are taken?)
Even simplifying it doesn’t seem to work?
v-add-cron-job admin 0 12 * * * perl /installer/fix-templates.cgi
Error: invalid day format :: add.cgi
BTW the document says:
Options: USER MIN HOUR DAY MONTH WDAY COMMAND [JOB] [RESTART]
[JOB] [RESTART] options?
Ah ok - so looking into /var/log/hestia/system.log, I can see when it run the “add cron” command (when using the GUI interface), it had single quotes around. So this works:
v-add-cron-job admin '0' '12' '*' '*' '*' 'perl /installer/fix-templates.cgi'
I’d still be interested in what the RESTART and JOB values are? If RESTART is true, does it add it as an @restart command? (i.e when the server reboots)
Job is the job you want to execute
Restart restarts the cron service
This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.