Crontab and working directory

Tags
shell scripts

Login to Reply

 
Thread Tools Search this Thread
# 1  
Old 02-05-2010
Crontab and working directory

Hi all
I would like to crontab some python script I have.
These have the task to write a txt file on the same directory where they are let' say 'scriptFolder'.
When I schedule the script execution with crontab the file is printed out somewhere else.
Is there any way to tell crontab that for that script the directory should be the one of the script?
I am using the following

46 8 * * python \scriptFolder\MyScript.py

Can you help me with that?
# 2  
Old 02-05-2010
Try,
Code:
46 8 * * cd \scriptFolder; python MyScript.py

# 3  
Old 02-05-2010
It works!
Thank you very much!
Regards
Mn
Login to Reply

|
Thread Tools Search this Thread
Search this Thread:
Advanced Search

Similar Threads More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Crontab is not working BPANDEY Red Hat 5 09-17-2015 11:55 AM
Crontab not working Junaid Subhani Shell Programming and Scripting 7 06-06-2015 04:02 PM
Crontab not working krebe Linux 4 02-12-2013 05:50 AM
Crontab is not working in printf gc_sw Shell Programming and Scripting 7 01-21-2013 12:50 PM
Crontab not working, please help samantha13 UNIX for Advanced & Expert Users 0 08-02-2012 01:25 PM
crontab not working isaacniu Solaris 6 01-09-2012 06:41 PM
crontab is not working!! getrue Red Hat 14 09-08-2011 12:06 PM
crontab not working shifahim UNIX for Dummies Questions & Answers 8 08-16-2011 09:22 AM
crontab is not working. getrue Solaris 6 07-27-2011 01:34 AM
crontab not working lg123 UNIX for Dummies Questions & Answers 2 04-24-2011 04:47 PM
crontab not working rajesh_hv UNIX for Advanced & Expert Users 4 10-28-2008 08:45 AM
crontab-nmon not working fara_aris AIX 5 06-03-2008 06:08 AM
crontab NOT working baanprog UNIX for Advanced & Expert Users 2 09-26-2006 01:11 PM
crontab command not working digant UNIX for Advanced & Expert Users 8 01-04-2004 09:46 PM
crontab not working right kymberm UNIX for Dummies Questions & Answers 3 07-09-2003 05:21 PM
All times are GMT -4. The time now is 08:51 AM.

Unix & Linux Forums Content Copyright 1993-2018. All Rights Reserved.
UNIX.COM Login
Username:
Password:  
Show Password





Not a Forum Member?
Forgot Password?