execute a php file once per day [duplicate-mod, please delet

Hi all, I Have a php file in which I have code that does resets a counter in my mysql database. I would like to have this php file execute everyday at 12:00AM . I am on Arch Linux, with Nginx and php-cgi. I google this and there found this bit of code :

0 0 * * * /path/to/php /var/www/html/reset.php

but I have no idea how to run it or how to set it in place. can any one help (also is that bit of code that simple? simply include the path to my php and the script)?

1 Reply

@nthvision:

Hi all, I Have a php file in which I have code that does resets a counter in my mysql database. I would like to have this php file execute everyday at 12:00AM . I am on Arch Linux, with Nginx and php-cgi. I google this and there found this bit of code :

0 0 * * * /path/to/php /var/www/html/reset.php

but I have no idea how to run it or how to set it in place. can any one help (also is that bit of code that simple? simply include the path to my php and the script)?

If you want to add the snippet above to your user's crontab:

crontab -e

Reply

Please enter an answer
Tips:

You can mention users to notify them: @username

You can use Markdown to format your question. For more examples see the Markdown Cheatsheet.

> I’m a blockquote.

I’m a blockquote.

[I'm a link] (https://www.google.com)

I'm a link

**I am bold** I am bold

*I am italicized* I am italicized

Community Code of Conduct