You are not logged in.

#1 2015-03-12 03:39:22

Bailando
Member
From: Hungary
Registered: 2013-08-19
Posts: 133
Website

Which cron implementation should I use to set environment for the job?

I used cronie till now, but when the job commands contains utf-8 characters, jobs are not executed properly. I tried to set environment variables in "/etc/environment" file, but no success. I also tried the "vixie-cron" package, but all I get is a error message when I issue the command "crontab -l" : You (XY) are not allowed to use this program (crontab). I tried to "touch" /etc/cron.allow with my username and even "/etc/cron.d/cron.allow", none of them helped.

Which is the magic config file or proper package to use?

Offline

#2 2015-03-12 05:33:52

x33a
Forum Fellow
Registered: 2009-08-15
Posts: 4,587

Re: Which cron implementation should I use to set environment for the job?

Have you tried calling your script as

LANG=<> scriptname

Offline

#3 2015-03-13 11:51:49

Mr.Elendig
#archlinux@freenode channel op
From: The intertubes
Registered: 2004-11-07
Posts: 4,092

Re: Which cron implementation should I use to set environment for the job?

Why not use systemd timer units?


Evil #archlinux@libera.chat channel op and general support dude.
. files on github, Screenshots, Random pics and the rest

Offline

#4 2015-03-13 14:57:52

brebs
Member
Registered: 2007-04-03
Posts: 3,742

Re: Which cron implementation should I use to set environment for the job?

Probably /etc/pam.d/cron

The magic line(s) containing pam_env, e.g.:

# Read environment variables from pam_env's default files, /etc/environment
# and /etc/security/pam_env.conf.
session       required   pam_env.so

# In addition, read system locale information
session       required   pam_env.so envfile=/etc/default/locale

Offline

Board footer

Powered by FluxBB