I accidentally deleted root’s cronjobs in the terminal and I am in the process of restoring the cronjobs. I was wondering if anyone can please give me a list of the default/original root cronjobs for Webmin/Virtualmin?
I look in the webmin configuration in hopes of being able to restore them there but wasn’t able to find anything.
I don’t think my server had /etc/webmin/status/monitor.pl cron job going. For me, monitor.pl is in another directory. (/usr/libexec/webmin/status/monitor.pl)
I looked into the older cron logs to see if monitor.pl ever ran, and it doesn’t have that one for example. Nor does it have the raid-check.
Same as yours, of course. I made sure that the OS and version is the same.
I am unable to do so now, I am busy with something else but if you could wait a few hours I will try and get that info across to you if no one else does so first.
As I don’t use centos I can’t give you the info straight up, but I got an idea.
Why not spin up a centos instance on one of the number of vps providers that use hourly billing, like Linode, Do, Vultr and install Virtualmin? Considering it should only take a few minutes the cost would be a few cents top
Would you advise that I set monitor.pl (for me its located here: /usr/libexec/webmin/status/monitor.pl) cronjob although looking/searching the cron logs, I did not see this at all. The system is fairly new and there are only 3 cron logs at the moment - 2 old ones and 1 current, none of which I was able to find monitor.pl being ran and even raid-check as well.
Yes, you should add a cron job for monitor.pl. Virtualmin needs it only non-essentially (AFAIK) on a new system but in future if you use certain options then this is required.
Unless you have a specific reason for not running monitor.pl, you should run it
Hmm, then I suppose the system that I have copied the Virtualmin cron settings from is configured for RAID a bit differently than the one you are using. I just checked another C7 system and it does not have a cron job for RAID at all, so I think it is fine for you to leave this one out.
One other thing I’ve just realized. Spamassassin was in the cronjobs list at one point by its entry in the cron log:
Mar 30 04:10:01 editthis CROND[16909]: (root) CMD (/usr/share/spamassassin/sa-update.cron 2>&1 | tee -a /var/log/sa-update.log)
It’s the only entry and it seems either it was removed when I accidentally deleted root’s cronjobs or my server hosting provider removed it when I was upgraded to CentOS Linux 7.9.2009. If they removed it, it’s because I see that spamassassin is not even installed on the system at all.
Would you recommend a good tutorial as too installing/configuring spamassassin please?
I recall having spamassassin on my CentOS 6 server prior to being upgraded to 7.9.2009.
is script hidden? you call it job from ./hidden - are you sure you have written path to your script correctly? Also on server you should do full path to the script etc /home/some-user/script.pl etc…
Thanks for the reply. No, after checking to see if it’s hidden, it’s not hidden. It’s permissions though is: 0644
Do you think that could be the reason? Most of the files in the folder status-lib.pl is located in, their permissions is 0755. Some files in there have 0644, like status-lib.pl does.
Can you check your permissions for file status-lib.pl?
@DonX nah all you should do is make file executable chmod +x status-lib.pl and then in your cron - call that file without ./ means in command time /home/username/perhaps-another-folder/status-lib.pl > /dev/null 2>&1 and also run this as user who own the script or perhaps as root. Let me know if any errors…
Finally able to get back here after some personal related issues.
Anyhow, I get the same error after trying what you suggested. I think this issue is because of my hosting company installing virtualmin/webmin via minimal installation. Other than that, not sure. Thanks.