Skip to content
TheChatArchiveThe Chat Archive
Human-written demonstration (OpenAssistant volunteers)· OpenAssistant (human-written)Hugging Face OpenAssistant Conversations (oasst2)

What is the best way to run a bash script periodically on ubuntu?

In OpenAssistant data, “assistant” turns were written by human volunteers as demonstrations. They are not model outputs.
  1. User

    What is the best way to run a bash script periodically on ubuntu?

  2. Assistant

    you can use the watch command:

    watch -n5 ./script.sh will execute the script every 5s

    or use a cron job:

    */2 * * * * /home/user/script.sh will execute the script every 2min

    A cron job must be configured with crontab -e, and is more suited for a long running job such as a backup. Whereas the watch command is easier for simple temporary use cases such as monitoring a transfer or making a quick test.

Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.