title: How to run a spark file with spark-shell
body: <p>I wrote a HelloWorld spark application. The file looks like this:</p>
  
  <pre><code>object HelloWorld{
    def main(args: Array[String]){
      println("HelloWorld")
    }
  }
  </code></pre>
  
  <p>but it's just a file. I want to run it from the bash terminal and not from the spark-shell. I would like to make a scheduled task with crontab. How can I get this to work?</p>