Hi,
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
[email protected]
CONTENT_TYPE="text/plain; charset=utf-8"
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
Cheers
Andy
Raphael
December 20, 2022, 6:07am
2
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 crontab -l
Thanks
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
1 Like
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?
Thanks
Andy
Raphael
December 20, 2022, 7:15am
5
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
root@east:/backup#
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]
What are [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)
eris
December 20, 2022, 8:51am
8
Job is the job you want to execute
Restart restarts the cron service
1 Like
system
Closed
January 19, 2023, 9:14am
10
This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.