You are not logged in.

#1 2014-11-12 08:26:03

juraskaz
Member
Registered: 2014-10-29
Posts: 4

Cron/cronie jobs issue

Hi everyone,

The short version of the problem:

I have installed cronie, enabled it with:

<code>systemctl enable cronie
systemctl start cronie</code>

Added new file named alarms in cron.d directory with the following content:
<code>*/1 * * * * root mpg123 /home/zilvinas/beep.mp3</code>

Also edited crontab using crontab -e command:
<code>[zilvinas@localhost cron.d]$ crontab -l
*/1 * * * * mpg123 /home/zilvinas/beep.mp3
</code>

The file beep.mp3 is at home directory and I want to trigger it every 15 minutes but for testing purposes I use timeframe for every 1 minute.

Some information when typing systemctl status cronie:
<code>
[zilvinas@localhost cron.d]$ systemctl status cronie
● cronie.service - Periodic Command Scheduler
   Loaded: loaded (/usr/lib/systemd/system/cronie.service; enabled)
   Active: active (running) since Wed 2014-11-12 09:32:31 EET; 49min ago
Main PID: 8863 (crond)
   CGroup: /system.slice/cronie.service
           ├─8863 /usr/bin/crond -n
           └─9462 /usr/sbin/anacron -s

Nov 12 10:21:01 localhost CROND[9822]: pam_unix(crond:session): session closed for user root
Nov 12 10:21:02 localhost systemd-coredump[9830]: Process 9825 (mpg123) of user 0 dumped core.
Nov 12 10:21:03 localhost CROND[9823]: pam_unix(crond:session): session closed for user zilvinas
Nov 12 10:22:01 localhost crond[9840]: pam_unix(crond:session): session opened for user root by (uid=0)
Nov 12 10:22:01 localhost CROND[9842]: (root) CMD (mpg123 /home/zilvinas/beep.mp3)
Nov 12 10:22:01 localhost crond[9841]: pam_unix(crond:session): session opened for user zilvinas by (uid=0)
Nov 12 10:22:01 localhost CROND[9843]: (zilvinas) CMD (mpg123 /home/zilvinas/beep.mp3)
Nov 12 10:22:01 localhost CROND[9840]: pam_unix(crond:session): session closed for user root
Nov 12 10:22:02 localhost systemd-coredump[9847]: Process 9842 (mpg123) of user 0 dumped core.
Nov 12 10:22:02 localhost CROND[9841]: pam_unix(crond:session): session closed for user zilvinas
</code>

When typing the command alone it works perfectly and beep sound can be heard.

Maybe anyone knows how this problem could be solved?

I would appreciate any thoughts that could point in right direction.

Offline

#2 2014-11-13 12:44:45

juraskaz
Member
Registered: 2014-10-29
Posts: 4

Re: Cron/cronie jobs issue

Additionally what I have noticed that the message appears when there is audio running in the background (for example in youtube or rhytmbox). If no audio is playing then it beeps successfully.

Offline

Board footer

Powered by FluxBB