27

It is always a struggle configuring a cronjob to run certain scripts; there is always a mis configuration, a PATH, an environment variable that is different from when you use it in interactive mode, etc.. Do you have any tricks to avoid or minimize those issues?

cc @selfhost@lemmy.ml

you are viewing a single comment's thread
view the rest of the comments
[-] nitrolife@rekabu.ru 6 points 2 years ago

You can use crontab -e from user. That set user environment to usual state. Or you can use systems timers instead crontab.

Or you can set all environment variables inside cron file.

this post was submitted on 28 Aug 2023
27 points (100.0% liked)

Self Hosted - Self-hosting your services.

15164 readers
4 users here now

A place to share alternatives to popular online services that can be self-hosted without giving up privacy or locking you into a service you don't control.

Rules

Important

Cross-posting

If you see a rule-breaker please DM the mods!

founded 4 years ago
MODERATORS