Cron tab
Posted by: naji
Posted on: 2007-10-01 14:23:00
I want to add a cron job but i think somthing wrong.
For example
cd $HOME/urduhome.net/Dir name/Dir name ; File name
Help me please
Posted by: naji
Posted on: 2007-10-01 14:23:00
I want to add a cron job but i think somthing wrong.
For example
cd $HOME/urduhome.net/Dir name/Dir name ; File name
Help me please
Posted by: sdayman
Posted on: 2007-10-01 15:32:00
What are you trying to do? Is that "File name" an executable? This is how I'd write it:
cd ~/urduhome.net/dirname/dirname; ./filename
I'm expecting that filename have permissions of 755 or the like so it'll run. If it's a PHP or similar script, then you'll have to tell the application to execute that file.
-Scott
Posted by: naji
Posted on: 2007-10-02 12:46:00
Ooh sorry
Thanks for reply Scott
I run the php scripts on my site and call this scripts,
cd $HOME/urduhome.net/weblog/wp-content ; php -q update-feeds.php
Reply message in my mail,
sh: line 1: /home/urduhome.net/weblog/wp-content: No such file or directory
sh: line 1: update-feeds.php: command not found
So which call i use php scripts.
Thanks
Naji
Posted by: monkeyboy7706
Posted on: 2007-10-02 13:09:00
To use php you need to use something like
/usr/local/php5/bin/php script.php
in this case you should just need
/usr/local/php5/bin/php $HOME/urduhome.net/weblog/wp-content/update-feeds.php
see http://wiki.dreamhost.com/Cron#Executing_a_PHP_Script_with_Crontabs
Replace the /usr/local/php5/bin/php with /usr/local/bin/php if you need php4.
If that doesn't work try
/usr/bin/lynx -dump http://domain.com/script.php which will open it in lynx as if it was a web page then quit.
$97 DISCOUNT DISCOM97, Double bandwidth or disk DISCOMX2BWor DISCOMX2SPACE (worth $119.40pa). More codesEdited by monkeyboy7706 on 10/02/07 01:26 PM (server time).
Posted by: naji
Posted on: 2007-10-02 15:23:00
No way....
Thanks your reply dear.
When i call the scripts your first option so see the message,
No input file specified.
And when i call the your 2nd option so see the message,
Login »
* [2]« Back to blog
* [3]Lost your password?
Naji