-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
cannot get cron to work #957
Comments
crouton doesn't use upstart, so you need to run crond explicitly, probably from the chroot's /etc/rc.local. Look inside /etc/init/cron for the commands needed to launch crond. |
Thanks, it looks to be |
Cool! Thanks for sharing your findings. |
Exactly what I needed. Thanks both y'all. |
What is the best way to run scripts inside the chroot at shutdown or reboot, for cleanup, etc.? Thanks! |
There's no official mechanism for it at the moment. You may be able to make a script that gets run from rc.local that does nothing but wait for SIGTERM, and then performs your cleanup tasks. |
Hmm. Thanks. Five seconds can be pretty tight for some stuff though. |
You could modify unmount-chroot to change that timeout. Otherwise, you'll probably have to try some other approach. Also worth noting is that while there's a system dbus message that gets fired on shutdown, crouton doesn't actually respond to it, so even the SIGTERM approach may not work for the shutdown case... |
After setting up a crouton chroot, cron does not seem to work.
What I've done:
sudo enter-chroot
crontab -e
* * * * * echo "hi from cron" >> /home/matt/hiFromCron.txt"
/home/matt
within the chroot or at the "real" /home/matt outside of the chroot (I went there and added a matt directory)ps -A | grep cron
returns nothing. It definitely looks like cron is not running.But doing
sudo /etc/init.d/cron start
just produces "Rather than invoking init scripts through /etc/init.d, use the service(8) ..."So I do
sudo service cron start
and get "Unknown job: cron"And
sudo start cron
gives me "start: Unknown job: cron"I'm not convinced this is a Crouton specific issue, but hoping I can get some pointers on what to try next.
The text was updated successfully, but these errors were encountered: