09
Apr
2011
admin

Managing Cron Jobs with PHP

Background – An Overview of the Crontab

Let’s face it, having the ability to schedule tasks to run in the background is just great! From backing up an SQL database, fetching / sending emails to running clean up tasks, analyzing performance, or even grabbing RSS feeds, cron jobs are fantastic!

Although the syntax of scheduling a new job may seem daunting at first glance, it’s actually relatively simple to understand once you break it down. A cron job will always have five columns each of which represent a chronological ‘operator’ followed by the full path and command to execute:

  1. * * * * * home/path/to/command/the_command.sh  

Each of the chronological columns has a specific relevance to the schedule of the task. They are as follows:

  • Minutes represents the minutes of a given hour, 0-59 respectively.
  • Hours represents the hours of a given day, 0-23 respectively.
  • Days represents the days of a given month, 1-31 respectively.
  • Months represents the months of a given year, 1-12 respectively.
  • Day of the Week represents the day of the week, Sunday through Saturday, numerically, as 0-6 respectively.
  1. Minutes [0-59]  
  2. |   Hours [0-23]  
  3. |   |   Days [1-31]  
  4. |   |   |   Months [1-12]  
  5. |   |   |   |   Days of the Week [Numeric, 0-6]  
  6. |   |   |   |   |  
  7. *   *   *   *   * home/path/to/command/the_command.sh  

So, for example, if one wanted to schedule a task for 12am on the first day of every month it would look something like this:

  1. 0 0 1 * * home/path/to/command/the_command.sh  

If we wanted to schedule a task to run every Saturday at 8:30am we’d write it as follows:

  1. 30 8 * * 6 home/path/to/command/the_command.sh  
06
Apr
2011
admin

Windows SSH Secure Shell Initial Connection and Transferring Files

To use these instructions it is necessary to download and install SSH Secure Shell for Windows. If you haven't downloaded this application, do so now:

SSH Download
SSH Communications Window Client (Version 3.2.9, which includes support for pass-thru printing)

05
Apr
2011
admin

এপ্রিলের মিথ্যাচার

মিথ্যা একটি চারিত্রিক ব্যাধি। যার মধ্যে মনুষ্য রুচিবোধ কিংবা সুস্থ প্রকৃতি বিদ্যমান সে কোনক্রমেই এর প্রতি সমর্থন জ্ঞাপন করতে পারে না। আর না করাই হচ্ছে স্বাভাবিক মনুষ্য ধর্ম। সকল ধর্মেই এর প্রতি নিন্দা জ্ঞাপন করা হয়েছে।

‘পক্ষান্তরে সত্য পৃথিবীর স্থায়িত্বের একটি মূল ভিত্তি। প্রশংসাযোগ্য বস্তু, নবুওয়তের অংশ ও তাকওয়ার ফল। এ সত্য না থাকলে শরিয়তের বিধানসমূহ অকেজো হয়ে যেত।  মূলত মিথ্যা বলার দোষে দুষ্ট হওয়ার অর্থ হচ্ছে মানবতা থেকে বেরিয়ে যাওয়া। কারণ, কথা বলা মানুষের একটি বৈশিষ্ট্য আর কথা সত্য না হলে তার কোন অর্থই থাকে না।’ (মুহাম্মদ আল-খাদেমি: বারীকাতুন মাহমূদিয়া, ৩/১৮৩)

05
Apr
2011
admin

সদ্য ভূমিষ্ঠ সন্তানের ক্ষেত্রে করণীয়

সন্তান ভূমিষ্ঠ হওয়ার পর করণীয় :

১. সন্তান ভূমিষ্ঠ হলে আল্লাহর প্রসংশা করা, তার শুকরিয়া আদায় করা ও সন্তানের জন্য দোয়া করা। পবিত্র কুরআনে ইবরাহিম আলাইহিস সালাম সম্পর্কে এরশাদ হয়েছে, সন্তান ভূমিষ্ঠ হওয়ার পর তিনি বলেন, সকল প্রশংসা আল্লাহর, যিনি বৃদ্ধ বয়সে আমাকে ইসমাঈল ও ইসহাককে দান করেছেন। নিশ্চয় আমার রব দোআ শ্রবণকারী। হে আমার রব, আমাকে সালাত কায়েমকারী বানান এবং আমার বংশধরদের মধ্য থেকেও, হে আমাদের রব, আর আমার দোআ কবুল করুন। (সূরা ইবরাহিম : ৩৯-৪১)

03
Apr
2011
admin

PHP Class: Convert Plural to Singular or Vice Versa in English

List of Functions

Other than pluralize and singularize, this class has some more functions to convert text strings by certain standards. List below are all the functions this class has:

28
Mar
2011
admin

How to search text in files or folders in Command Line of Ubuntu

 

Applications -> Accessories -> Terminal

and write the following command:

grep -i -n -r ‘searchtext’ *

-i for ignore case sens, -n for line number and -r for recursive

where searchtext is the text you want to search in your files.

This will bring the results with the file names, containing all the files which has the text searchtext.

12
Mar
2010
admin

How do I fix “Setup did not find any hard disk drives installed in your computer” error during Win XP Pro install?

When I try to reinstall Windows XP in ASUS Z99Eseries, I got following message:
"Setup did not find any hard disk drives installed in your computer.

Make sure any hard disk dirves are powered on and properly connected to your computer, and that any disk-related hardware configuration is correct. This may involve running a manufacturer-supplied to diagnostic or setup program.

Setup cannot continue. To quit Setup, press F3."

So, I try to fix this more and more time. And finally fixed this following way:

08
Mar
2010
admin

বিবিসির দৃষ্টিতে পৃথিবীর সেরা ১০০ টি উপন্যাস

২০০৩ সালের এপ্রিল মাস থেকে সর্বকালের সেরা ১০০ টি উপন্যাস নির্বাচিত করার জন্য বিবিসি জরিপ শুরু করে। প্রায় সাড়ে সাত লাখ ভোট আসে সর্বকালের সেরা ১০০ টি উপন্যাস নির্বাচনের জন্য। নিচে এগুলোর নাম দেওয়া হলোঃ

03
Mar
2010
admin

Salah : The Benefit of the Worshipper's Standing Before His Lord

The Prayer is a sanctified and holy moment (mauqif) for the worshipper in the presence of his Lord and Deity in truth. He fulfils (by its performance) his covenants, obligations and statements of confession which are contained within and are required by the testimony that:"There is nothing which has the right to be worshipped except Allah and that Muhammed is His Messenger" and by whose attestation one becomes a muslim.

03
Mar
2010
admin

Encouraging Children to Pray

Practical Tips on Getting Your Little Loved Ones to Make and Enjoy Salah - By Maysoon Zaza

03
Mar
2010
admin

Sitting after Fajr and Praying 2 Rakah after sunrise - for which there is a reward equal to a completed Hajj

With regard to sitting after Fajr prayer until the sun rises then praying two rak’ahs, it is narrated that the Prophet (peace and blessings of Allaah be upon him) said: “Whoever prays Fajr in congregation then sits remembering Allaah until the sun rises, then prays two rak’ahs, will have a reward like that of Hajj and ‘Umrah, complete, complete, complete.” Narrated by al-Tirmidhi (586). 

Shaykh al-Albaani (may Allaah have mercy on him) :classed it as hasan in Saheeh Sunan al-Tirmidhi. 

03
Mar
2010
admin

The Difference between Jumu’ah and Thur (Zuhr)

By Ash-Shaykh Muhammad ibn Salih Al-Uthaymeen (may Allah have mercy on him) Taken from His Majmu’ Vol 15 page 376-378
Translated by Abu Aaliyah Abdullah ibn Dwight Battle—Adam

• Jumu’ah doesn’t go into effect until there is a congregation. The ulema differ over the exact number for the congregation. Thur is correct whether there is one person or a congregation.

• Jumu’ah can only take place in a village or town. Thur can be prayed anywhere.

02
Mar
2010
admin

Simple Math Question Captcha Component

I don’t like CAPTCHAs. I don’t know anyone who does.The downfalls of CAPTCHAs are many - hard to read, annoying, impossible for those with vision difficulties - and the benefits are slim. So, I came up with an alternative: a plain text math question to ask the user. This component generates a random equation and registers the answer as a session variable. The programmer can then check the form submitter’s answer against the session-registered answer using the validation function provided in the component.

02
Mar
2010
admin
16
Jan
2010
admin

নিঝুম দ্বীপ ভ্রমণ

Deer at Nijhum Dwipগভীর সমুদ্রে, নীরবে নিভৃতে, শান্ত স্নিগ্ধ রূপ নিয়ে নোয়াখালী জেলার হাতিয়া উপজেলার দক্ষিণে মেঘনা নদীর মোহনায় ১৯৪০ এর দশকে ধীরে ধীরে নিঝুম দ্বীপটি জেগে  ওঠে।  সেখানে কেওড়া-গেওয়া বনের কোলঘেঁষে বয়ে যাওয়া সরু খালের পাড়ে সবুজের আচ্ছাদিত নকশিকাঁথার মাঠে দলবেঁধে হরিণের ছুটে চলা ও জোয়ারের সময় খালের পাড়ে জলপানের দৃশ্য, ঝাঁকে ঝাঁকে অতিথি পাখির ওড়াওড়ি ও বণে পাখির কিচিরমিচির, বালুচরে চিক চিক মিষ্টি সূর্যরশ্মি, সাগরবক্ষের নৈসর্গিক সৌন্দর্যময় অভয়ারণ্য নিঝুম দ্বীপে শীত মৌসুমজুড়ে প্রকৃতির এমন মায়াবীরূপ প্রতিদিনই উপভোগ্য।

Pages

Subscribe to Welcome to my blog........... RSS