I have a command-line program that is periodically run by services (either as a cronjob or by systemd) and it heavily depends on environment variables which are not static (that is, they might change) which makes it impossible to create a file and source it in the service script (as stated in this question).
Is there a way to access environment variables from a UNIX service (crontab or systemd) dynamically?