This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Dude Crontab

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 / bash
echo 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 ?



This thread was automatically locked due to age.
Parents Reply Children
  • 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].

    Cheers - Bob

     
    Sophos UTM Community Moderator
    Sophos Certified Architect - UTM
    Sophos Certified Engineer - XG
    Gold Solution Partner since 2005
    MediaSoft, Inc. USA
  • 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.

    Some idea?

  • BAlfson,

    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

    Cheers - Bob

     
    Sophos UTM Community Moderator
    Sophos Certified Architect - UTM
    Sophos Certified Engineer - XG
    Gold Solution Partner since 2005
    MediaSoft, Inc. USA