title: How to run periodic celery task manually from terminal in pyramid?
body: <p>I am working on a 'pyramid(pylon)' project. I have configured celery to run some tasks periodically and it works fine. But I am struggling on how to run any of the task from terminal manually. The directory structure of my project is</p>
  
  <pre><code>/pyramid/
      celeryconfig.py
      development.ini
      setup.py
      /views/celerytasks/
          __init.py__
          mytask1.py
          mytask2.py
  </code></pre>
  
  <p>Here 'celeryconfig.py' contains all the settings about celery like 'CELERY_IMPORTS', 'CELERY_QUEUES' and 'CELERYBEAT_SCHEDULE'. I have some task in 'mytask1.py' file which used to run once a day. But how can I run it from pshell manually? I am using ubuntu 10.04.</p>
  
  <p>Can anybody tell?</p>
  
  <p><b>SOLUTION:</b></p>
  
  <pre><code>1- Go to the application root folder, in my case '/pyramid/'.
  2- Run 'pshell development.ini'
  3- &gt;&gt;&gt; from views.celerytasks.mytask1 import CeleryTask1
  4- &gt;&gt;&gt; celeryTask1 = CeleryTask1()    // Create instance of imported class
  5- &gt;&gt;&gt; celeryTask1.delay()     // Finally here the task will run
  </code></pre>