Executing bash script with cron

Started by guest32123, February 19, 2022, 06:29:52 PM

Previous topic - Next topic
Hello ;D,

i would like to execute a bash/sh script with cron.
i made actions_bashscript.conf in /usr/local/opnsense/service/conf/actions.d/
File contains:
[load]                                                                         
command:/usr/local/opnsense/scripts/shell/bash.sh                 
parameters:                                                                     
type:script                                                                     
message: Run bash script                                   
description: Run bash script

After creating the file, I restarted configd with: service configd restart
Then I executed the file with configctl bashscript load. The output was [OK]
But the script didn't make a directory in /root/ for me.

if I run the script with /usr/local/opnsense/scripts/shell/bash.sh
It will create a directory

What do I miss?  ???

Thanks in advance.

My bad, I think I placed this topic in the wrong section.
If someone can move it, please do  :-[

This section is fine. you can change "type" to "script_output and debug with stdout (echo).


Cheers,
Franco