Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- * * * * * /usr/bin/php /opt/app/current/record_user_login.php
- "Could not open input file"
- <?
- include("connect_to_mysql.php");
- //Logged in in 1 week
- $current_date = date('Y-m-j H:i:s', strtotime("-1 weeks"));
- $query = "SELECT DISTINCT user_id FROM users_login_history WHERE sign_in_time > '$current_date'";
- $result = mysql_query($query) or die(mysql_error());
- $i = 0;
- while($row = mysql_fetch_array($result)){
- $i++;
- }
- $query = "INSERT INTO sqm_data (feature, action) VALUES ('user login', $i)";
- if(!mysql_query($query)) {
- die('Error: ' . mysql_error());
- }
- ?>
- * * * * * cd /var/www/html/cron/; /usr/bin/php /var/www/html/cron/filename.php -q -f
- * * * * * /usr/bin/php -q /opt/app/current/record_user_login.php
- * * * * * php -q /opt/app/current/record_user_login.php
- php -q -f /home/skat_2347/public_html/cron.php /home/skat_2347/public_html/
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement