Sukhjinder Singh
Sukhjinder Singh

Reputation: 135

URL execution time on linux server

i am using ubuntu serverand i am sending mails through cronjob. There is little problem that i want to know the execution time of the URL which is executed via cronjob.

For example

*/5 * * * * wget -q https://anydomain.com/sendmail.php

Please tell me that how can i find the execution time of sendmail.php

even i tried to read the logs of cronjob but i didn't find proper answer.

Upvotes: 0

Views: 78

Answers (1)

Mihail Ivanov
Mihail Ivanov

Reputation: 36

As deagh has mentioned in the comments you can use time to measure the execution of a command. You will need to wrap the command in parentheses in order to be treated as one command for the stdout.

(time wget -q https://anydomain.com/sendmail.php) &> /tmp/time.sendmail.log

This will log the output in the tmp file.

Upvotes: 2

Related Questions