Hello Guest, if you are reading this it means you have not registered yet. Please take a second, Click here to register, and in a few simple steps you will be able to enjoy our community and use our OpenViX support section.
Results 1 to 2 of 2

Thread: Cron Job Not Working

  1. #1

    Title
    Member
    Join Date
    Jan 2015
    Posts
    41
    Thanks
    12
    Thanked 1 Time in 1 Post

    Cron Job Not Working

    I am trying to run a script every 10 mins.

    so I managed to figure out how to edit a timer with telnet,
    type crontab -e
    press the insert key to edit
    make your changes
    press esc to exit edit mode
    type :wq to save and exit
    I tried both, */10 * * * * as well as 10,20,30,40,50,00 * * * *

    neither worked, i then tried the default repeat one hour timer from within the GUI, and also didn't work.

    the script i am running works fine, i have tested with script runner.

    this is on a fresh install of the latest vix image.

    Any ideas? Thanks

  2. #2

    Title
    Member
    Join Date
    Jan 2015
    Posts
    41
    Thanks
    12
    Thanked 1 Time in 1 Post
    SOLUTION
    To create a cron job for a time that is not available in OpenVix GUI (i.e every half hour or anything else) the simplest way to do this is to use a FTP file manager such as Total Commander and edit the following file on your box,
    Code:
    /etc/cron/crontabs/root
    enter your required time followed by the path to the script you would like to run, for example
    Code:
     */2  * * * * /usr/scripts/script_name.sh
    which will run the selected script every 2 mins.

    It is useful to know the logs for cron jobs can be found at:
    Code:
    /var/log/messages
    A good website to help you set your cron job time exactly as you would like is: https://crontab.guru/

    Thanks to user Birdman

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
This website uses cookies
We use cookies to store session information to facilitate remembering your login information, to allow you to save website preferences, to personalise content and ads, to provide social media features and to analyse our traffic. We also share information about your use of our site with our social media, advertising and analytics partners.