You are not logged in.
Pages: 1
My crond daemon doesn't work on startup.
I need to issue a
/etc/rc.d/crond restart
to make the scheduled tasks run.
My daemons array is:
DAEMONS=(syslog-ng hal dbus network crond cpufreq !laptop-mode wicd alsa bluetooth vnstat)
should the order be changed?
Regards,
Apoorv
Offline
If your system is not on 24/7 crond will of course only work at the exact time that the cron jobs are stated to run. Perhaps you should install and run "anacron" as well, to ensure the jobs get run. Would that be your problem?
Philosophy is looking for a black cat in a dark room. Metaphysics is looking for a black cat in a dark room that isn't there. Religion is looking for a black cat in a dark room that isn't there and shouting "I found it!". Science is looking for a black cat in a dark room with a flashlight.
Offline
Offline
Offline
I couldn't get both anacron or cronwhip.
I think you misunderstood me. I don't want to run missed jobs. I just want to run jobs after bootup procedure.
Something that is specified by @reboot in cron. This isn't happening on my arch installation. It seems that none of the cron jobs are running at all unless I restart the daemon manually after bootup.
Regards,
Apoorv
Offline
In light of a few annoying crond bugs i recently switched to fcron. tastes great, less filling. Oh, and it provides this particular behavior. Installation was simple enough -- only had to breeze over the man page to port my crontabs to fcron's format.
Before anyone asks, the bugs in question with dcron have already been posted on the bug tracker. no response from the developer (an Arch user) and no activity in the dcron git repo since early this year (February-ish). It also doesn't play well with systemd, but that's not really dcron's fault.
Offline
Unfortunately I am having the same problem with fcron. Whatever I give in the startup doesn't start. I nedd to carry out the same manual restart of the fcron daemon to make it work.
Regards,
Apoorv
Offline
/etc/conf.d/crond has something like:
CROND_ARGS="-S -l info"
Adjust the log level then look in your log file for the reason.
Offline
Here's the log for crond:
Sep 6 15:25:36 boolean-pc crond: /usr/sbin/crond 4.4 dillon's cron daemon, started with loglevel info
Sep 6 15:26:01 boolean-pc crond: FILE /var/spool/cron/root USER root PID 9136 job sys-hourly
Sep 6 15:28:01 boolean-pc crond: reading /var/spool/cron/cron.update
Sep 6 15:28:01 boolean-pc crond: failed parsing crontab for user theta: unknown job 2m
Sep 6 15:29:05 boolean-pc crond: /usr/sbin/crond 4.4 dillon's cron daemon, started with loglevel info
Sep 6 15:29:05 boolean-pc crond: failed parsing crontab for user theta: unknown job 2m
Sep 6 15:30:01 boolean-pc crond: FILE /var/spool/cron/theta USER theta PID 5000 job vu
Sep 6 15:30:14 boolean-pc crond: mailing cron output for user theta job vu
Sep 6 15:30:14 boolean-pc crond: unable to exec /usr/sbin/sendmail: cron output for user theta job vu to /dev/null
Sep 6 15:32:01 boolean-pc crond: FILE /var/spool/cron/theta USER theta PID 5490 /usr/bin/vuze
Sep 6 15:32:04 boolean-pc crond: mailing cron output for user theta /usr/bin/vuze
Sep 6 15:32:04 boolean-pc crond: unable to exec /usr/sbin/sendmail: cron output for user theta /usr/bin/vuze to /dev/null
And heres my crontab: (i changed it just for testing)
0 * * * * ~/Wallpapers/change-background-folder.py
22 23-6 * * * /usr/bin/vuze
32 15 * * * /usr/bin/vuze
@reboot ID=vu AFTER=2m /usr/bin/vuze
Is the syntax wrong?
Regards,
Apoorv
Offline
AFTER is used to run a job after another job is run. If you want to delay vuze, i recommend using
/bin/sleep 2m && /usr/bin/vuze
Steven [ web : git ]
GPG: 327B 20CE 21EA 68CF A7748675 7C92 3221 5899 410C
Do not email: honeypot@stebalien.com
Offline
AFTER is used to run a job after another job is run. If you want to delay vuze, i recommend using
/bin/sleep 2m && /usr/bin/vuze
I tried this but still no use. The log file output is attached below. The exit status of each job is 1. I suppose that there was some error to while executing them. Could this be related to permissions? As soon as I restart the daemon manually, vuze pops up after 3 secs. So there's nothing wrong with the crontab. Its something to do with the crond daemon running automatically. And as of now I have placed crond as last in the DAEMONS array in /etc/rc.conf (Although I have tried all other combinations.
Sep 6 20:00:48 boolean-pc crond: /usr/sbin/crond 4.4 dillon's cron daemon, started with loglevel info
Sep 6 20:01:01 boolean-pc crond: FILE /var/spool/cron/theta USER theta PID 6850 job vu
Sep 6 20:01:01 boolean-pc crond: FILE /var/spool/cron/theta USER theta PID 6851 job vu
Sep 6 20:01:01 boolean-pc crond: mailing cron output for user theta job vu
Sep 6 20:01:01 boolean-pc crond: unable to exec /usr/sbin/sendmail: cron output for user theta job vu to /dev/null
Sep 6 20:02:04 boolean-pc crond: mailing cron output for user theta job vu
Sep 6 20:02:04 boolean-pc crond: unable to exec /usr/sbin/sendmail: cron output for user theta job vu to /dev/null
Sep 6 20:44:01 boolean-pc crond: /usr/sbin/crond 4.4 dillon's cron daemon, started with loglevel info
Sep 6 20:45:01 boolean-pc crond: FILE /var/spool/cron/theta USER theta PID 4994 job vu
Sep 6 20:45:01 boolean-pc crond: FILE /var/spool/cron/theta USER theta PID 4995 job vu
Sep 6 20:45:01 boolean-pc crond: FILE /var/spool/cron/root USER root PID 4996 job sys-hourly
Sep 6 20:45:01 boolean-pc crond: exit status 1 from user theta job vu
Sep 6 20:45:01 boolean-pc crond: mailing cron output for user theta job vu
Sep 6 20:45:01 boolean-pc crond: unable to exec /usr/sbin/sendmail: cron output for user theta job vu to /dev/null
Sep 6 20:45:42 boolean-pc crond: mailing cron output for user theta job vu
Sep 6 20:45:42 boolean-pc crond: unable to exec /usr/sbin/sendmail: cron output for user theta job vu to /dev/null
Sep 6 21:00:01 boolean-pc crond: FILE /var/spool/cron/theta USER theta PID 6658 ~/Wallpapers/change-background-folder.py
Sep 6 21:00:01 boolean-pc crond: exit status 1 from user theta ~/Wallpapers/change-background-folder.py
Sep 6 21:00:01 boolean-pc crond: mailing cron output for user theta ~/Wallpapers/change-background-folder.py
Sep 6 21:00:01 boolean-pc crond: unable to exec /usr/sbin/sendmail: cron output for user theta ~/Wallpapers/change-background-folder.py to /dev/null
Offline
VUZE probably needs to know which X display to use. It may also need access to the dbus-daemon.
First try:
/bin/sleep && DISPLAY=:0.0 /usr/bin/vuze
And if that doesn't work, try:
/bin/sleep && DISPLAY=:0.0 /usr/bin/dbus-launch /usr/bin/vuze
BTW, why are you using cron for this anyway. You should just put vuze in one of your login scripts.
Steven [ web : git ]
GPG: 327B 20CE 21EA 68CF A7748675 7C92 3221 5899 410C
Do not email: honeypot@stebalien.com
Offline
VUZE probably needs to know which X display to use. It may also need access to the dbus-daemon.
First try:/bin/sleep && DISPLAY=:0.0 /usr/bin/vuze
And if that doesn't work, try:
/bin/sleep && DISPLAY=:0.0 /usr/bin/dbus-launch /usr/bin/vuze
BTW, why are you using cron for this anyway. You should just put vuze in one of your login scripts.
Yeah, you are right that I should use the login scripts to start vuze. My primary aim was to start vuze at certain time during the night and schedule some music playback at 3 different times during the day. But unfortunately, unless I give a manual restart to the cron daemon
sudo /etc/rc.d/crond restart
after bootup, none of the scheduled tasks run. One of them also includes a wallpaper changer script. I just landed up experimenting to start vuze after startup.
Offline
Pages: 1