title: How to deploy and run at a specific time Python scripts on Apache Spark?
body: <p>I have set of simple python 2.7 scripts. Also, I have set of linux nodes. I want to run at a specific time these scripts on these nodes. </p>
  
  <p>Each script may work on each node. The script is not able to run on multiple nodes simultaneously.</p>
  
  <p>So, I want to complete 3 simple tasks:</p>
  
  <ol>
  <li>To deploy set of scripts.</li>
  <li>To run at a specific time main script with specific parameters on any node.</li>
  <li>To get result, when script is finished.</li>
  </ol>
  
  <p>It seems, that I am able to complete first task. I have the following code snippet:</p>
  
  <pre><code>import urllib
  import urlparse
  from pyspark import SparkContext
  
  
  def path2url(path):
      return urlparse.urljoin(
          'file:', urllib.pathname2url(path))
  
  MASTER_URL = "spark://My-PC:7077"
  deploy_zip_path = "deploy.zip"
  sc = SparkContext(master=("%s" % MASTER_URL), appName="Job Submitter", pyFiles=[path2url("%s" % deploy_zip_path)])
  </code></pre>
  
  <p>But I have problems. This code immediately launches tasks. But I want just deploy scripts to all nodes. </p>