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

Self Hosted - Self-hosting your services.

11440 readers
1 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

Beginning of January 1st 2024 this rule WILL be enforced. Posts that are not tagged will be warned and if not fixed within 24h then removed!

Cross-posting

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

founded 3 years ago
MODERATORS
 

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
[–] Anticorp@lemmy.ml 1 points 1 year ago

Put all the logic in a php file and just configure crontab to run the file at the given interval and output the results to a log file. Use crontab.guru to help with scheduling.