Cron tab


#1

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


#2

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


#3

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


#4

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 [color=#CC0000]DISCOM97[/color], Double bandwidth or disk [color=#CC0000]DISCOMX2BW[/color]or [color=#CC0000]DISCOMX2SPACE[/color] (worth $119.40pa). More codes


#5

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