-1

i want to run a cron job on centos/directadmin server

i want to run this page every minute. how i must do it? http://site.com/index.php?action=script

1

2 Answers 2

1

If you really want to call the website and have it run the PHP; use CURL or WGET

crontab -e as any user

* * * * * /path/to/wget http://site.com/index.php?action=script > /dev/null

1

Run the command

crontab -e

While logged in as the user you want to run the command as.

Since you are using DirectAdmin you can also add your command in the user control panel.

Crontab is in the advanced menu

And then enter your crontab information:

Add crontab details

In the command field using your example, you would use:

/usr/bin/wget http://site.com/index.php?action=script

Clicking "Prevent email" will add >/dev/null 2>&1 to the end of the line to suppress the email sent upon successful or unsuccessful crontab run.

Not the answer you're looking for? Browse other questions tagged .