Skip to content

Latest commit

 

History

History
30 lines (21 loc) · 859 Bytes

04-cron-usage.md

File metadata and controls

30 lines (21 loc) · 859 Bytes

CRON usage

Configuration for CRON

Cronjobs are usually CLI scripts. But JoliNotif's Unix/Linux drivers are GUI applications. This means you need to specify the display where the notification will be sent.

You can achieve this by setting the XDG_RUNTIME_DIR environment variable in your cronjob:

* * * * * XDG_RUNTIME_DIR=/run/user/$(id -u) php /path/to/your/script

Note On some system, you may also/instead need to set DISPLAY env var and/or to run xhost +local:. For more information, please have a look at https://help.ubuntu.com/community/CronHowto#GUI_Applications

Next readings

Previous pages: