Hi,

Try this :

55 21 * * * cd /media/Store/galaxy/galaxy-dist/ && python scripts/cleanup_datasets/cleanup_datasets.py config/galaxy.ini -d 30 -1 -i >> /media/Store/galaxy/galaxy-dist/temp 2>&1

I thought you need to be in the galaxy-dist folder when launching the commands.

Best,

Geert

On 11/19/2014 11:14 PM, James Mullan wrote:
Hello,
I am trying to figure out how to run the cleanup scripts in a cron job. The below works on command line:

python scripts/cleanup_datasets/cleanup_datasets.py config/galaxy.ini -d 30 -1 -i
pysqlite>=2 egg successfully loaded for sqlite dialect
##########################################

# 2014-11-19 22:07:32 - Handling stuff older than 30 days
# Displaying info only ( --info_only )

Deleted 0 histories
Elapsed time:  0.0684289932251
##########################################

but if I try to do this in a cron job as follows:


55 21 * * * python scripts/cleanup_datasets/cleanup_datasets.py config/galaxy.ini -d 30 -1 -i >> /media/Store/galaxy/galaxy-dist/temp 2>&1

python: can't open file 'scripts/cleanup_datasets/cleanup_datasets.py': [Errno 2] No such file or directory

or if I try to do this :


00 22 * * * python /media/Store/galaxy/galaxy-dist/scripts/cleanup_datasets/cleanup_datasets.py config/galaxy.ini -d 30 -1 -i >> /media/Store/galaxy/galaxy-dist/temp 2>&1

Traceback (most recent call last):
File "/media/Store/galaxy/galaxy-dist/scripts/cleanup_datasets/cleanup_datasets.py", line 13, in <module>
    from galaxy import eggs
ImportError: No module named galaxy


Note that I am directing the output to a file only to try to find out why it's not working.


Is this a problem with environment?

Any suggestions what to try would be much appreciated.

Regards
​James​

J P Mullan


___________________________________________________________
Please keep all replies on the list by using "reply all"
in your mail client.  To manage your subscriptions to this
and other Galaxy lists, please use the interface at:
   http://lists.bx.psu.edu/

To search Galaxy mailing lists use the unified search at:
   http://galaxyproject.org/search/mailinglists/


--

Geert Vandeweyer, Ph.D.
Department of Medical Genetics
University of Antwerp
Prins Boudewijnlaan 43
2650 Edegem
Belgium
Tel: +32 (0)3 275 97 56
E-mail: geert.vandewe...@ua.ac.be
http://ua.ac.be/cognitivegenetics
http://www.linkedin.com/in/geertvandeweyer

___________________________________________________________
Please keep all replies on the list by using "reply all"
in your mail client.  To manage your subscriptions to this
and other Galaxy lists, please use the interface at:
  http://lists.bx.psu.edu/

To search Galaxy mailing lists use the unified search at:
  http://galaxyproject.org/search/mailinglists/

Reply via email to