Home>

I'm completely new to Linux.
I tried to run a script that is cron, but it seems that two PIDs are running a single script each time.

00 0 * * * username hoge.sh
Sep 15 01:51:01 vmname crond [30464]: (* system *) RELOAD (/ etc/crontab)
Sep 15 01:51:01 vmname crond [30464]: ((null)) Unauthorized SELinux context = unconfined_u: unconfined_r: unconfined_t: s0 file_context = system_u: object_r: system_cron_spool_t: s0 (/ etc/crontab)
Sep 15 01:51:01 vmname crond [30464]: ((null)) SELinux in permissive mode, continuing (/ etc/crontab)
Sep 15 01:51:01 vmname crond [33597]: (* system *) NULL security context for user, but SELinux in permissive mode, continuing ()
Sep 15 01:51:01 vmname CROND [33599]: (username) CMD (hoge.sh)
Sep 15 01:51:01 vmname crond [33520]: (* system *) RELOAD (/ etc/crontab)
Sep 15 01:51:01 vmname CROND [33602]: (username) CMD (hoge.sh)
Sep 15 01:51:06 vmname CROND [33600]: (username) CMDOUT (running hoge.sh)
Sep 15 01:52:31 vmname CROND [33597]: (username) CMDOUT (running hoge.sh)


* Some configuration files and logs have been edited.
Is SELinux-related output causing such duplication due to a crontab reload immediately after running hoge.sh with the first PID?

  • Answer # 1

    Probably

    Sep 15 01:51:01 vmname crond [33520]: (* system *) RELOAD (/ etc/crontab)

    When,crontabIt's probably because you're reloading the file.
    / etc/crontab/ etc/cron */*/ var/spool/cron/rootLet's check around.