Configuration du système/Planificateur de tâches

From KDE UserBase Wiki
Revision as of 10:21, 7 June 2019 by Ognarb (talk | contribs) (Created page with "* Entrer un commentaire (optionnel). Il est préférable que le commentaire soit descriptif, expliquant ce que la tâche va faire. En effet, il peut être difficile de compren...")

Information générale

Planificateur de tâches est une interface graphique pour l'outil standard "cron". Avec lui, des commandes (où tâches) peuvent être exécuté à une date spécifique, ou selon un intervalle défini (temps entre les exécutions).

Planificateur de tâches dans Plasma 5

Usage

Le planificateur de tâches peut être démarré, en démarrant l'application Configuration du système. Sélectionner Démarrage et arrêt suivie par Planificateur de tâches.

Ajouter et modifier une tâches

  • Cliquer sur "Nouvelle tâches..." pour ajouter une nouvelle taches, ou "Modifier..." pour modifier une tâche existante. La page Ajouter ou modifier une tâche planifiée va être affichée.
La page"Ajouter ou modifier une tâche planifiée" de configuration du système
  • Entrer une commande qui va être exécutée. Cliquer sur un dossier pour le choisir depuis une fenêtre de dialogue.
  • Entrer un commentaire (optionnel). Il est préférable que le commentaire soit descriptif, expliquant ce que la tâche va faire. En effet, il peut être difficile de comprendre la tâche avec seulement la commande.
  • Click Enable this task to enable the task to run.
  • Click Run at system bootup to enable the script to run each time the system is booted.
  • Click Run every day to enable the script to run every day. This will automatically select the appropriate options.
  • Using the buttons, choose when the command should be run. Not all parameters are required, those not needed may be left blank.
    • Hours and Minutes are the time of day to run the task, not an interval.
  • When done, click OK. The task will be added and scheduled if enabled.

Tip

Click Run Now to run a task immediately after adding or modifying the task.


Removing a task

To completely remove a task, select the task from the list and click the Delete button. This will permanently remove the task.

Environment Variables

Sometimes a task or multiple tasks need a specific variable set, it must be added in the Environment Variables section. The cron utility uses its own environment, system-wide and user-specific variables are not used. Click New Variable to add a new variable definition, or Modify to change an existing variable.

  • The value the variable will contain. This can be a number or string.
  • Enter a brief description of the variable.

Astuces

  • All the files that are modified are located in the /etc/cron directory where there are numerous files to look at.
  • The command-line tool that allows you to have a look at the currently installed cron-jobs is
    crontab -l
    (that's the letter L).

Plus d'information