title: Missing application resource while running script in pyspark
body: <p>I have been trying to execute a script .py by pyspark but I keep getting this error:</p>
  
  <pre><code>11:55 $ ./bin/spark-submit --jars spark-cassandra-connector-2.0.0-M2-s_2.11.jar --py-files example.py
  Exception in thread "main" java.lang.IllegalArgumentException: Missing application resource.
      at org.apache.spark.launcher.CommandBuilderUtils.checkArgument(CommandBuilderUtils.java:241)
      at org.apache.spark.launcher.SparkSubmitCommandBuilder.buildSparkSubmitArgs(SparkSubmitCommandBuilder.java:160)
      at org.apache.spark.launcher.SparkSubmitCommandBuilder.buildSparkSubmitCommand(SparkSubmitCommandBuilder.java:276)
      at org.apache.spark.launcher.SparkSubmitCommandBuilder.buildCommand(SparkSubmitCommandBuilder.java:151)
      at org.apache.spark.launcher.Main.main(Main.java:86)
  </code></pre>
  
  <p>I can easily execute it by doing this:</p>
  
  <pre><code> 11:57 $  pyspark --jars spark-cassandra-connector-2.0.0-M2-s_2.11.jar
  </code></pre>
  
  <p>then paste the code block by block in the <code>IPython</code> (interactive shell) . but I want to put the script in a cronjob so that It can be executed automatically. I need a command to put in cronjob and the <code>spark-submit</code> is not working. Any ideas?</p>