Rov qab siv Crontab ntawm ArchLinux Siv Cronie

Peb cov uas nyiam kom muaj lub luag haujlwm tau teem tseg hauv PC, automate paub tab thiab lwm yam zoo li ntawd, peb paub tseeb cron thiab yog li ntawd, crontab.

Nws tshwm sim nyob rau hauv ArchLinux tam sim no yam tau hloov, SystemD Nws yog tus muaj hwjchim loj kawg nkaus uas paub txhua yam, ua txhua yam thiab txhua tus neeg nyob ntawm nws ... yog li, qhov peb tau ua dhau los yog hloov / lwm yam / crontab, zoo, peb yuav tsis tuaj yeem ua ntxiv lawm

Tam sim no hauv ArchLinux peb yuav tsum nruab ib pob khoom hu ua cronie, uas yuav ua rau nws yooj yim rau peb kom ua haujlwm cov haujlwm tsis tiav, teem sijhawm rau cov txheej txheem kom ua raws lub sijhawm.

archlinuxbylapapunk

Nruab thiab ua kom muaj Cronie

Thawj qhov yeej yuav tsum los nruab cronie, rau qhov no:

sudo pacman -S cronie

Tom qab ntawd peb yuav tsum pib nws thiab ua kom nws:

sudo systemctl pib cronie sudo systemctl pab cronie

Yuav ua li cas teem sijhawm ua haujlwm nrog Cronie?

Nws yog qhov yooj yim, dhau ntawm kev hais kom ua uas peb tseem tuaj yeem siv ua ntej, nws yuav ua rau peb hloov kho txoj haujlwm ua tiav ntawm peb cov neeg siv khoom.

Tiam sis ua ntej !!, cov neeg tsis paub nrog vi Kuv xav kom koj tshaj tawm rau nano raws li nws neej ntawd editor hauv davhlau ya nyob twg:

ncha "export EDITOR = nano" >> $ HOME / .bashrc export EDITOR = nano

Tiag tiag teem sijhawm ua haujlwm peb yuav siv cov lus txib:

crontab -e

Qhov no yuav qhia peb cov kho ntawv xov xwm hauv lub davhlau ya nyob twg (nano yog tias lawv tau ua saum toj no) dawb paug, nyob ntawd peb sau dab tsi peb tso ua ntej, piv txwv li Kuv yuav muab tias txhua 1 feeb ib daim ntawv tsim nyob hauv kuv lub tsev hu ua sim:

* *   * * * touch /home/tu-usuario/prueba

Rau qhov hloov pauv kom mus ua haujlwm, uas yog, coj mus rau hauv tus account, nws tsis yog yuav tsum tau rov pib ua haujlwm, ntau tsawg, txhua yam yog instantaneous.

Yuav siv crontab li cas?

Yog tias koj tsis paub siv crontab, yuav sau dab tsi, ntawm no yog qee cov ntawv uas yuav pab tau:

Piv txwv li, Kuv xav tau ib tsab ntawv sau rau 11am, kab yuav yog:

00 11   * * * cd /home/kzkggaara/Scripts/ && ./miscript.sh

TSEEM CEEB, lawv yuav tsum tsis txhob muab tus neeg siv tso rau hauv cov ntaub ntawv uas qhib thaum lawv ua crontab -e, ua ntej hauv / etc / crontab lawv yuav tsum tso tus neeg siv uas yuav ua txhaum cov lus txib, tam sim no nrog crontab -e nws tsis tsim nyog ntxiv lawm.

Qhov kawg!

Zoo, tsis muaj dab tsi ntxiv rau ntxiv, Kuv cia siab raws li ib txwm ... nws tau pab tau.


Cov ntsiab lus ntawm tsab xov xwm ua raws li peb cov ntsiab cai ntawm kev tswj hwm kev ncaj nceesCov. Tshaj tawm ib qho yuam kev nyem no.

8 lus, tawm koj li

Tso koj saib

Koj email chaw nyob yuav tsis tsum luam tawm.

*

*

  1. Lub luag haujlwm rau cov ntaub ntawv: Miguel Ángel Gatón
  2. Lub hom phiaj ntawm cov ntaub ntawv: Tswj SPAM, kev tswj xyuas tawm tswv yim.
  3. Sau raws cai: Koj kev tso cai
  4. Kev sib txuas lus ntawm cov ntaub ntawv: Cov ntaub ntawv yuav tsis raug xa mus rau lwm tus neeg thib peb tsuas yog los ntawm kev txiav txim siab raug cai.
  5. Cov ntaub ntawv khaws cia: Cov Ntaub Ntawv khaws tseg los ntawm Occentus Networks (EU)
  6. Txoj Cai: Txhua lub sijhawm koj tuaj yeem txwv, rov qab thiab tshem tawm koj cov ntaub ntawv.

  1.   mat1986 said

    Kuv tab tom nrhiav rau pem hauv ntej kom muaj kev qhia txog kev siv cronie. Thaum kawg Kuv tuaj yeem pom nws. Ua Tsaug !! 😀

    1.    Mario said

      Timers, raws li wiki piav qhia zoo, yog qhov kev hloov rau hauv systemd, nws tsis yog "Reuse Crontab hauv ArchLinux".

  2.   algave said

    Wow Kuv tsis paub "cronie" thaum kawg Kuv tuaj yeem siv crontab hauv archlinux, nws tseem nyob hauv chakralinux repos:]

    Ua Tsaug !! 0 /

  3.   Eduardo said

    Hauv kev piv txwv tshaj tawm tsab ntawv yuav khiav txhua hnub thaum 00:11 sawv ntxov thiab tsis yog 11 teev sawv ntxov. Nco ntsoov tias tus thawj ntsuas yog qhov feeb thiab thib ob teev.

    Tsaug!

    1.    KZKG ^ Gaara said

      Huag txoj kev, kuv phem, Kuv twb kho kom raug

  4.   willarmand said

    Kuv tsis paub tias qhov no yuav muab kuv cov teeb meem tib yam li cron, rau kuv nws tsis tuaj yeem siv rtcwake nrog cron, nws tsuas yog tsis ua haujlwm rau kuv, Kuv tau saib txhua qhov chaw kom teem sijhawm ua haujlwm ntawm cov lus txib ntawd thiab nws tsuas yog tsis ua haujlwm, piv txwv li no ua haujlwm hauv lub davhlau ya nyob twg:
    sudo rtcwake -m standby -t $ (hnub +% s -d '10: 31')
    tab sis thaum muab tso nrog cron nws tsuas yog hais tias nws txhim kho nws tab sis nws tsis tuaj yeem tsim nws.
    Puas muaj ib tug neeg paub kho nws, lossis kho tsis tau nws?
    regards

bool (muaj tseeb)