Nethserver-crontabmanager

I saw this post, maybe close, where the problem was a Path Issue -> http://www.linuxforums.org/forum/red-hat-fedora-linux/195186-crontab-not-running-script-post920563.html

1 Like

This works as expected.

Can you explain exactly how you solved your issue
we can write down some notes on the wiki page of crontabmanager

Sorry! Yes - this your suggestion fixed the issue. But the problem is - It do not show up in crontabmanager.
Would it be reasonable to see in crontabmanager all the entries under /etc/cron.d ?

Martins

installed your crontabmanager instandly and it works great!
I would vote, that this should be standard in NS.
Thanks for this!

(Hope this like-button is mega enough :grin:)

3 Likes

maybe it could solve your issue, but in fact cron.d is normally used by rpm to drop cron jobs, so the standard way for user’s cron job is definitively the crontab.

However I agree the behaviour seems different

what about if you comment in /etc/e-smith/templates/etc/crontab/10base

PATH=/sbin:/bin:/usr/sbin:/usr/bin
by
#PATH=/sbin:/bin:/usr/sbin:/usr/bin

followed by

signal-event nethserver-crontabmanager-update

think to remove temporary your cron.d file

Edit : alternatively we can also try to add more path

PATH=/sbin:/bin:/usr/sbin:/usr/bin
by
PATH=/sbin/e-smith:/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin

1 Like

Indeed, it’s time to go one step further! :slight_smile:
@stephdl do we need to open a new bounty to finalize this and move it on the forge? Please open a new one.

yum install http://mirror.de-labrusse.fr/nethserver/nethserver-crontabmanager/nethserver-crontabmanager-0.0.5-1.ns6.sdl.noarch.rpm

would you mind to test it, the path of the crontab is

+PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin

tested crontabmanager. had the same path issue. tried to stop and start a specific vm. start command worked, stop command didn’t work. added path /usr/local/bin and /usr/local/sbin to crontab and stop command worked. added also path to template fragment. is it possible to get this automated? thanks in advance ! :wink:

The version nethserver-crontabmanager-0.0.5-1.ns6.sdl.noarch.rpm has a new path inside, did you test this version ?

Sorry no, installed version is 0.0.4. Will try 0.0.5 next week.
Have a nice weekend!

installed today 0.0.5. Path works perfectly. Thanks a lot and sorry for my little mistake last week. :slight_smile:
One question: i want to stop and start a specific vm at certain times. Start command “vboxmanage startvm “VM” --type headless” works, but “vboxmanage controlvm “VM” acpipowerbuttton” doesn’t work. if i set the stop command at console it works perfectly. Do you have an idea what i do wrong? Thanks in advance. Ralf.

Not too much ideas for now
i have the same problem like you but i found another approach with systemd
maybe you can take some ideas

https://geekeries.de-labrusse.fr/?p=2989

Sorry french inside

hallo stephane, i found a simple solution. Just did a shellscript with runuser and call this via crontab.

#!/bin/sh
runuser root -c “vboxmanage -q controlvm “VM” acpipowerbutton” >/var/log/vbox

seems to work for my task.

Where is located vboxmanage ?

Edit -> /usr/bin

Strange ?

does it work for your problem also?

I solved my issue with a systemd init script for each vm i must start and pause with the system so i don’t need to use a crontab :slight_smile:

2 Likes

Hallo Stephane,
may I ask you to add a feature to crontab-manager? It would be very comfortable and helpfull to see the sceduled times of cronjobs in the crontab-manager window. Is this possible?
Thanks in advance. Ralf

Valuable NFR but not so easy to do with the code I gave, OK the code can be changed of course.

I added in the crontab table the field of advanced settings (enabled/disabled) because the sysadmin could do an error on the scheduling of his cron job, so to put there when the job is launched makes sense.

NFR, what does it mean? :blush:

1 Like