We are happy to announce that Vesta is back under active development as of 25 February 2024. We are working on v1 candidate and expect to engage more with the community over the coming months. We are committed to open source, and we encourage contributors to help us build the future of Vesta.
cron is re-writing my delete cache command?
-
- Posts: 57
- Joined: Thu Apr 27, 2017 7:40 pm
- Os: Ubuntu 15x
- Web: apache + nginx
cron is re-writing my delete cache command?
So I am trying to add the following command as a cron job:
The problem is for some reason, vesta is rewriting the command....
so upon saving, instead of the command above, it is saving
Note that user1, user2, user3, user4, user5 are actually the user names of accounts.
This is obviously a problem as when more users are added, they would not be automatically included in the command - because its not saving as /home/*/tmp
Is this a bug? Is there a work around other than updating the cron every time a new user is added?
Code: Select all
find /home/*/tmp -type f -name 'sess_*' -cmin +60 -delete
so upon saving, instead of the command above, it is saving
Code: Select all
find /home/admin/tmp /home/user1/tmp /home/user2/tmp /home/user3/tmp /home/user4/tmp /home/user5/tmp -type f -name 'sess_*' -cmin +60 -delete
This is obviously a problem as when more users are added, they would not be automatically included in the command - because its not saving as /home/*/tmp
Is this a bug? Is there a work around other than updating the cron every time a new user is added?
Re: cron is re-writing my delete cache command?
HI
Vesta have some with asterisk, not remember when but I see similar issue
You can try just not add a cron with full command, vesta parsewith php somethings and is not good if you have complex simbols
You just can fix this addking new file
For example:
/usr/local/bin/fix_ses.sh
Inside that file add your command
chmod +x /usr/local/bin/fix_ses.sh
And then add your cron :
/usr/local/bin/fix_ses.sh
I think always this is the best way to create new crons with some complex operations, long scripts, special characters
Vesta have some with asterisk, not remember when but I see similar issue
You can try just not add a cron with full command, vesta parsewith php somethings and is not good if you have complex simbols
You just can fix this addking new file
For example:
/usr/local/bin/fix_ses.sh
Inside that file add your command
Code: Select all
#!/bin/bash
find /home/*/tmp -type f -name 'sess_*' -cmin +60 -delete
And then add your cron :
/usr/local/bin/fix_ses.sh
I think always this is the best way to create new crons with some complex operations, long scripts, special characters