0

I have a jail on my FreeNAS server containing Plex, and I have at the root of this jail a script called PMS_Updater.sh which checks if a new version of Plex is available and install it if it is the case.

To run the script manually, I do: (jail ID 1 for plex in this case)

jexec 1 csh
./PMS_Updater.sh -vv -a

I want to have this script executed on a daily basis during the night. As I particularly don't like vi, I first changed the editor to nano. I did try with both vi and nano anyway.

setenv VISUAL nano

Then I edit the crontab:

crontab -e
0 4 * * * ./PMS_Updater -a

And save. The file saved is: /tmp/crontab.ZNYUiym7w9. Yesterday, there was an update of plex. It was not done automatically this night, and I had to do it manually. What is my mistake here?

1

Can you please give the full path of the script instead of ./ to start with??

..and probably you need encapsulate your script arument in different way so that it might act as "one" ...so the cron gets less confuse.

Okay, one more thing, you might prefix the shell path too before the script like this /bin/csh your_script_name

....and if you can give us the script too ...so we can see ...take away all the sensitive information from it and give us a barebone one.

1
  • I should have close the question, my bad. The correct syntax was: 0 4 * * * /PMS_Updater.sh -a. The script is as it always has been located at the root of the jail. I don't know how I even forgot the extension .sh.. – Mathieu Nov 26 '20 at 15:40

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.