My next problem
Code:
Code:
#include <stdio.h>
#include <time.h>
#include <string.h>
int main ( void )
{
while(1)
{
time_t start_time, cur_time;
time(&start_time);
do
{
time(&cur_time);
}
while((cur_time - start_time) < 1);
time_t now;
struct tm *tm_now;
char buff1[BUFSIZ]; // PING
char buff2[BUFSIZ]; // MAIL
now = time ( NULL );
tm_now = localtime ( &now );
strftime ( buff1, sizeof buff1, "%X", tm_now ); //PING
strftime ( buff2, sizeof buff1, "%w%X", tm_now ); //MAIL
printf ("%s\n",buff1);
printf ("%s\n\n",buff2);
if( strcmp( buff1, "11:26:40" ) == 0 )
system("./php Command_line.php ");
if( strcmp( buff2, "412:08:20" ) == 0 )
system("./php posiljanje_na_gmail_za_probo.php ");
// return 0;
}
}
I've got time working now (delay for 1 sec, and run the program at preset time).
My problem now is, that when I run Command_line.php, the php program (ping about 5000 computers) works for about an hour, but then does not continue with my c program.
I want my c program, to continue working after the php program is finished.
What can I do?