Run commands in Truenas Jail from Cron Job

tbar44

Cadet
Joined
Apr 19, 2023
Messages
4
Hi there,

Trying to run a command in a jail each night as a Cron task, the command inside the quotes works fine if I run from shell, but not sure what I'm doing wrong for the Cron task.

I expect my snytax is wrong but can't see where I am going wrong.

Screenshot 2023-04-19 at 20.08.45.png
 

Samuel Tai

Never underestimate your own stupidity
Moderator
Joined
Apr 24, 2020
Messages
5,399
Rather than creating a cron job on the host, why not create the cron job inside the jail? I do this, and it works fine. Note, cron jobs run with a restricted PATH, so best practice is to use full command paths for cron jobs.
 
Top