Hello
I need to put in order the pharmacy shops in my town, their phones and addresses so that people visiting my site will know which pharmacy shop is going to be open that night. The night pharmacy is a different shop everyday and I want to show people which one stands duty that night. I have prepared the list and put it in mysql database. I have given each shop a unique number and by changing the number I can change all the information displayed. However, I want it to change automatically at a certain time of the day. Is this possible?
a code for nightpharmacy
Moderator: General Moderators
Re: a code for nightpharmacy
Don't need cron job, just use time and dates.
Re: a code for nightpharmacy
Thank you very much for your replies.
First I tried to do it with cronjobs but it didn't work. I have root access and use cpanel. I used the cpanel interface to add it as a cronjob. First I arranged the date and time and then I added the following command
Then I tried if/elseif command. Now it works but an unwanted and unexpected element is displayed, number "1" appears above the table. I don't know why it appears there. You can find the details in my second post, number 1 problem.
First I tried to do it with cronjobs but it didn't work. I have root access and use cpanel. I used the cpanel interface to add it as a cronjob. First I arranged the date and time and then I added the following command
Using the vi command I hoped to edit the goster-ozel.php, which contains the code. The code worked when I tried it manually with SSH. But it didn't work with cpanel cronjobs.vi
:imap jj <esc>
:read /home/denepan/public_html/goster-ozel.php
28j
11l
xi1jj
:w! goster-ozel.php
:q
exit
Then I tried if/elseif command. Now it works but an unwanted and unexpected element is displayed, number "1" appears above the table. I don't know why it appears there. You can find the details in my second post, number 1 problem.