Sunday, August 8, 2010

PHP Scripts With Cron

You will need to find out the answer to the following question, “Is my PHP installed as CGI or as an Apache module?”. To find out do the following: Create a new file, name it info.php (just an example), and put in the following code:
< ? phpinfo(); ? >
Upload to your webserver and go to it with your browser.
Now check for Server API (4th item from the top), if it says “CGI”, you have PHP compiled as CGI, if it reads “Apache”, you have it running as an Apache module.

Compiled CGI

If the answer to the question above is “CGI” then you need to add a line to your PHP script. It has to be the first line of your script and must contain your server’s PHP executable location:
#!/usr/local/bin/php -q
That looks a lot like PERL now, doesn’t it? After that let’s add the necessary command to our crontab. Edit /etc/crontab and add the following line:
* * * * * php /path/to/your/cron.php
Execute the following from the command line:
Shell> crontab crontab
Be sure your “script.php” has the necessary permissions to be executable (“chmod 755 script.php”).
Now you are all set!

Apache module

If your PHP is installed using the Apache module, the approach is a little different. First, you need access to Lynx (Lynx Browser for more information). Lynx is a small web browser, generally available on Unix and Linux.
Running your PHP script will not require you to add any additional lines. You simply have to edit your /etc/crontab file and add the following line:
* * * * * lynx -dump http://www.somedomain.com/cron.php
(or if email notification is not needed:
*/15 * * * * lynx -dump http://www.somedomain.com/cron.php >/dev/null 2>&1 )
Please note that in general, you have to specify the entire URL (with “http://” and so on). But depending on your Lynx’s configuration, the URL might be relative; I suggest always using the absolute reference as in my example above – it always works.
Again execute the following from the command line:
Shell> crontab crontab

Monday, June 28, 2010

Behavioral Interviewing

The following is a description of what behavioral interviewing is all about:

http://www.brockport.edu/career/behave.htm
https://web.archive.org/web/20100529172317/https://www.brockport.edu/career/behave.htm

BEHAVIORAL INTERVIEWING 
Behavioral interviewing is a style of interviewing that was developed in the 1970's by industrial psychologists. Behavioral interviewing asserts that "the most accurate predictor of future performance is past performance in a similar situation." Currently, most organizations are using behavioral interviewing to some degree.
Unlike traditional interviews, which include such questions as:
1. Tell me about yourself.
2. What are your strengths and weaknesses?
3. Why are you interested in working for us?
Behavioral interviewing emphasizes past performance and behaviors. As a consequence, candidates unprepared for the rigor of behavioral interviewing have not fared well. Simply practicing the list of common interview questions no longer works.
Why should you prepare for behavioral interview?
· Candidates who prepare for behavioral interviews are better prepared - even for traditional interviews.
· Using behavioral answers works well with inexperienced interviewers.
· Companies that invest the time and energy in developing behavioral interviews often attract top candidates. Top candidates make the company a more desirable place to work.
How do I prepare for a behavioral interview?
Companies that employ behavioral interviewing have predetermined the skill sets they require for a particular position. These skill sets could include: decision making and problem solving, leadership, motivation, communication, interpersonal skills, planning and organization, critical thinking skills, team building and the ability to influence others. The company determines the skill sets by doing a detailed analysis of the position they are seeking to fill. Job seekers also must go through this same process. To conduct a job analysis the job seeker should ask questions such as:

1. What are the necessary skills to do this job?
2. What makes a successful candidate?
3. What would make an unsuccessful candidate?
4. Why have people left this position previously?
5. What is the most difficult part of this job?
Once you have landed the interview, keep in mind the following points.
· Be detailed and specific. You should have developed three stories that illustrate your past performance. Remember that the interviewer will be operating under the premise that "past performance in a similar setting is the best predictor of future performance."
The best way to accomplish this is to use the three-step STAR process or
1. Situation or Task
2. Action
3. Result or outcome
For example, you might recount a time when communication within your work group had broken down (situation). To resolve the problem, you organized informal lunch meetings for people to discuss relevant issues (action). Morale then improved, as did the lines of communication (result). Using this three step STAR process is a powerful way for you to frame your experiences and accomplishments for the interviewer.
· Limit rambling and tangents. While you can't control what is asked, you can control what you say.
· Listen carefully to each question. If you are unsure, rephrase the question and ask for clarification. When you respond, be sure to recall your past accomplishments in detail.
· Practice your behavioral stories using real-life examples. It is very difficult to make up behavioral stories, which is why behavioral interviewing is becoming more popular. By practicing, you will be able to recall with confidence your past accomplishments.
Sample Behavioral Interview Questions
Decision Making and Problem Solving
Give me an example of a time when you had to keep from speaking or making a decision because you did not have enough information.
Give me an example of a time when you had to be quick in coming to a decision.
Leadership
What is the toughest group that you have had to get cooperation from?
Have you ever had difficulty getting others to accept your ideas? What was your approach? Did it work?
Motivation
Give me an example of a time when you went above and beyond the call of duty.
Describe a situation when you were able to have a positive influence on the action of others.
Communication
Tell me about a situation when you had to speak up (be assertive) in order to get a point across that was important to you.
Have you ever had to "sell" an idea to your co-workers or group? How did you do it? Did they "buy" it?
Interpersonal Skills
What have you done in the past to contribute toward a teamwork environment?
Describe a recent unpopular decision you made and what the result was.
Planning and Organization
How do you decide what gets top priority when scheduling your time?
What do you do when your schedule is suddenly interrupted? Give an example.
Other Behavioral Questions
Give a specific example of a policy you conformed to with which you did not agree.
Give me an example of an important goal which you had set in the past and tell me about your success in reaching it.
Describe an instance when you had to think on your feet to extricate yourself from a difficult situation.

Saturday, June 5, 2010

Long-Term Jobless Face Tough Odds

According to Yahoo/AP News, one who is jobless should scramble to find a new job as soon as possible because it is becoming increasingly difficult for someone who is out of a job for more than six months to find a new job:

http://finance.yahoo.com/news/Growing-ranks-of-longterm-apf-1793753012.html?x=0&sec=topStories&pos=main&asset=&ccode=