Bug 450084 - cronie runs jobs in wrong order
cronie runs jobs in wrong order
Status: CLOSED RAWHIDE
Product: Fedora
Classification: Fedora
Component: crontabs (Show other bugs)
9
i386 Linux
low Severity medium
: ---
: ---
Assigned To: Marcela Mašláňová
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2008-06-05 04:25 EDT by Milan Slanař
Modified: 2008-06-09 09:51 EDT (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2008-06-09 09:51:54 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Milan Slanař 2008-06-05 04:25:02 EDT
Description of problem:
Cronie runs jobs in wrong order when daily or weekly jobs are run.
Scripts starting with 0 (0anacron, 000-delay) are run at the end.

Version-Release number of selected component (if applicable):
cronie-1.0-6

How reproducible:
always

Steps to Reproduce:
1. just switch on computer
2.
3.
  
Actual results:
Jun  5 07:02:06 localhost crond[1927]: (CRON) STARTUP (1.0)
Jun  5 07:02:08 localhost anacron[1951]: Anacron 2.3 started on 2008-06-05
Jun  5 07:02:08 localhost anacron[1951]: Will run job `cron.daily' in 65 min.
Jun  5 07:02:08 localhost anacron[1951]: Will run job `cron.weekly' in 70 min.
Jun  5 07:02:08 localhost anacron[1951]: Jobs will be executed sequentially
Jun  5 08:01:01 localhost CROND[5590]: (root) CMD (run-parts /etc/cron.hourly)
Jun  5 08:07:08 localhost anacron[1951]: Job `cron.daily' started
Jun  5 08:07:08 localhost run-parts(/etc/cron.daily)[5879]: starting cups
Jun  5 08:07:09 localhost run-parts(/etc/cron.daily)[5884]: finished cups
Jun  5 08:07:09 localhost run-parts(/etc/cron.daily)[5886]: starting logrotate
Jun  5 08:07:09 localhost run-parts(/etc/cron.daily)[5891]: finished logrotate
Jun  5 08:07:09 localhost run-parts(/etc/cron.daily)[5893]: starting makewhatis.cron
Jun  5 08:07:27 localhost run-parts(/etc/cron.daily)[6146]: finished makewhatis.cron
Jun  5 08:07:27 localhost run-parts(/etc/cron.daily)[6148]: starting mlocate.cron
Jun  5 08:08:19 localhost run-parts(/etc/cron.daily)[6198]: finished mlocate.cron
Jun  5 08:08:19 localhost run-parts(/etc/cron.daily)[6200]: starting prelink
Jun  5 08:11:37 localhost run-parts(/etc/cron.daily)[7611]: finished prelink
Jun  5 08:11:37 localhost run-parts(/etc/cron.daily)[7614]: starting rpm
Jun  5 08:12:02 localhost run-parts(/etc/cron.daily)[7646]: finished rpm
Jun  5 08:12:02 localhost run-parts(/etc/cron.daily)[7648]: starting texlive.cron
Jun  5 08:12:02 localhost run-parts(/etc/cron.daily)[7653]: finished texlive.cron
Jun  5 08:12:02 localhost run-parts(/etc/cron.daily)[7655]: starting tmpwatch
Jun  5 08:12:03 localhost run-parts(/etc/cron.daily)[7691]: finished tmpwatch
Jun  5 08:12:03 localhost run-parts(/etc/cron.daily)[7693]: starting 0anacron
Jun  5 08:12:03 localhost run-parts(/etc/cron.daily)[7702]: finished 0anacron
Jun  5 08:12:03 localhost anacron[7700]: Updated timestamp for job `cron.daily'
to 2008-06-05
Jun  5 08:12:03 localhost run-parts(/etc/cron.daily)[7704]: starting 0logwatch
Jun  5 08:12:20 localhost run-parts(/etc/cron.daily)[8120]: finished 0logwatch
Jun  5 08:12:20 localhost run-parts(/etc/cron.daily)[8122]: starting 000-delay.cron
Jun  5 08:20:47 localhost run-parts(/etc/cron.daily)[8503]: finished 000-delay.cron
Jun  5 08:20:47 localhost anacron[1951]: Job `cron.daily' terminated

Expected results:
000-delay.cron should be first

Additional info:
Comment 1 Tomas Mraz 2008-06-05 05:39:05 EDT
This is a locale problem. The run-parts script should temporarily switch locale
to 'C'.

# Ignore *~ and *, scripts
for i in $1/*[^~,] ; do

should be changed to

# Ignore *~ and *, scripts, and sort in C locale
for i in $(LC_ALL=C; echo $1/*[^~,]) ; do

Note You need to log in before you can comment on or make changes to this bug.