• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
ask about performance

#1
well i'm sorry if this issue look like not good to be discussion, main case of me
  1. Just update whole users in every early month with spesification

i'm sorry if this such as cross question in stackoverflow here but i believe it's not

just to the point , is it good performance to do update data user only check by date
Code:
$time=date('d');
if ($time==='01')
{
    //doing update one table which is means all users            
}
else
{
    //just stay with me, don't do anything        
}

i just use date to check it, is it good for manage database, cause as long as being programmers i need action when operate data in database, thanks for your time read this question ?
Reply

#2
1.
Use a Cronjob. Set it to the first day of the month.

2.
I do not understand the question on stackoverflow.
Reply

#3
well ignore the second point, well i don't familiar with cron job is it seems like trigger ? please guide me to do that in cron job ?
Reply

#4
Cronjob is a tool on unix systems(eg. Linux).

- http://www.codeigniter.com/user_guide/general/cli.html

What system do you use? E.g ubuntu, debian etc.?
Reply

#5
windows, do you mean http://stackoverflow.com/questions/22846...in-3-3-8-1 create schedule in here
Reply

#6
No, i mean Cronjob
On windows it called Task Scheduler.

An other way is using mysql event-scheduler (if you use mysql)
Reply

#7
yes i use event scheduler but why it can't be working, i have testred by change date in my local computer, here is the image http://prntscr.com/a2ncgl, how can tested to see my event working or not ? thanks
Reply

#8
Try: SET GLOBAL event_scheduler = ON;
Edit: and check the checkbox
Reply

#9
hello, it's not working after follow your instruction ?
Reply

#10
i can use event_scheduler on my local xampp. Call the update without the event_scheduler.
Reply


Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2021 MyBB Group.