We'd love to hear about it! Click here to go to the product suggestion community
Hello everyone !
I am starting to handle the programmable tasks "Crontab", I wanted to start with a basic example before doing what I need. Try simply to make a "hello world" which I have in a scrit etc, my script is as follows:
#! / bin / bashecho hello world
Run chmod + x to give the permissions to execute.
This script embeds it in contrab-static in the following way:
50 18 * * * root /etc/holamundo.sh
It is assumed that this would have to run at 18:50 and print "hello world", however it does not!
What am I doing wrong ?
Help me please !
Cron jobs are background jobs that have no connection to a terminal.
Where do you expect to see the printed "hello world"
In reply to papa_:
Change the "hello world" to the "reboot" command so that the script reboots at a specific time, however this does not work either. What do you think I might be wrong about?
Thank you !!
In reply to eduardo gonzales:
When I execute the script in the following way:
The script restarts my UTM without problems.
Please help me !
Help me please !!!
After adding your line to /etc/crontab-static, what did you do to have the configuration daemon add it to /etc/crontab?
Cheers - Bob
In reply to BAlfson:
Thanks for your answer, the only thing I did was add the following line to / etc / crontab-static: 50 18 * * * root /etc/holamundo.sh the hellomundo.sh script has the command to restart the UTM.
Just to clarify: the date I'm putting is the correct one, I'm also having the utm time.
Unless you do something that causes the configuration daemon to rebuild /etc/crontab, your change to /etc/crontab-static will not be added to /etc/crontab. The easiest is probably to change the Up2Date Firmware Download Interval, [Apply], change it back and [Apply].
I will try this today
Thank you BAlfson!!!
This did not work BAlfson, change the interval of the updates, my script still does not run. Keep in mind that I am changing the parameter of the date on which my script should run.
This has worked in the following way:
10 13 1-31 1-12 0-7 root path_my_script I managed to restart the UTM at the time I specified in crontab-static, however try to do it with another script:
confd-client.plx passwd mynewpass
try to execute this with crontab-static and the script is never executed, also try the following script:
echo -e 'webadmin \ n allowed_networks @ \ n = ["REF_Networkany"] \ n' | cc --batch
However, it can not be executed either, try the following way:echo -e 'webadmin \ n allowed_networks @ \ n = ["REF_Networkany"] \ n' | confd-client.plx --batch
I have not had successful results. Could you tell me where I'm wrong?
Instead of confd-client.plx passwd mynewpass, do:
/usr/local/bin/confd-client.plx passwd mynewpass
Instead of echo -e 'webadmin \ n allowed_networks @ \ n = ["REF_Networkany"] \ n' | confd-client.plx --batch, do
echo -e 'webadmin \n allowed_networks@ \n = ["REF_Networkany"] \n' | /usr/local/bin/confd-client.plx --batch
Good !!!! Thankss !!!!!!!!!