Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

HOW TO: install in Ubuntu #168

Open
Open
@asterissco

Description

@asterissco

Cronie is a cron implementation used in red-hat that supports the CRON_TZ prefix with which you can set a time zone of a cron statement

The service works well, but the crontab editor that comes with it gives a lot of permission problems, so we are going to install cronie by hand, leaving everything else the same

Compilation

qrms@pruebas-cron:~$ sudo su -[sudo] password for qrms: root@pruebas-cron:~# apt-get install -y build-essentialroot@pruebas-cron:~# wget https://github.com/cronie-crond/cronie/releases/download/cronie-1.7.0/cronie-1.7.0.tar.gzroot@pruebas-cron:~# tar xzf cronie-1.7.0.tar.gz root@pruebas-cron:~# cd cronie-1.7.0/root@pruebas-cron:~/cronie-1.7.0# ./configure root@pruebas-cron:~/cronie-1.7.0# make

Creating and mapping folders with links

root@pruebas-cron:~/cronie-1.7.0# mkdir -p /usr/local/var/spool/root@pruebas-cron:~/cronie-1.7.0# ln -s /var/run/ /usr/local/var/runroot@pruebas-cron:~/cronie-1.7.0# ln -s /var/spool/cron/crontabs/ /usr/local/var/spool/cronroot@pruebas-cron:~/cronie-1.7.0# ln -s /etc/cron.d/ /usr/local/etc/cron.d

We copy the binary to /usr/local/bin and modify the cron service in systemd so that it loads cronie

root@pruebas-cron:~/cronie-1.7.0# cp src/crond /usr/local/bin/root@pruebas-cron:~/cronie-1.7.0# vim /lib/systemd/system/cron.service[Unit]Description=Regular background program processing daemonDocumentation=man:cron(8)After=remote-fs.target nss-user-lookup.target[Service]EnvironmentFile=-/etc/default/cron# ExecStart=/usr/sbin/cron -f $EXTRA_OPTSExecStart=/usr/local/bin/crond -f $EXTRA_OPTSIgnoreSIGPIPE=falseKillMode=processRestart=on-failure[Install]WantedBy=multi-user.target

Reload

root@pruebas-cron:~/cronie-1.7.0# systemctl daemon-reload root@pruebas-cron:~/cronie-1.7.0# systemctl restart cron.service root@pruebas-cron:~/cronie-1.7.0# systemctl status cron.service ● cron.service - Regular background program processing daemon     Loaded: loaded (/lib/systemd/system/cron.service; enabled; vendor preset: enabled)     Active: active (running) since Tue 2023-12-26 16:17:17 UTC; 4s ago       Docs: man:cron(8)   Main PID: 9520 (crond)      Tasks: 1 (limit: 2256)     Memory: 828.0K     CGroup: /system.slice/cron.service             └─9520 /usr/local/bin/crond -fdic 26 16:17:17 pruebas-cron systemd[1]: Started Regular background program processing daemon.dic 26 16:17:17 pruebas-cron crond[9520]: (CRON) STARTUP (1.7.0)dic 26 16:17:17 pruebas-cron crond[9520]: (CRON) INFO (Syslog will be used instead of sendmail.)dic 26 16:17:17 pruebas-cron crond[9520]: (CRON) INFO (RANDOM_DELAY will be scaled with factor 67% if used.)

And it should be working now

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions


      [8]ページ先頭

      ©2009-2025 Movatter.jp