Posts Tagged ‘record’

How to set a crontab to execute commands on a seconds time interval on GNU / Linux and FreeBSD

Sunday, October 30th, 2011

Reading Time: 2 minutes
crontab-execute-cron-jobs-every-second-on-linux-cron-logo
Have you ever been in need to execute some commands scheduled via a crontab, every let’s say 5 seconds?, naturally this is not possible with crontab, however adding a small shell script to loop and execute a command or commands every 5 seconds and setting it up to execute once in a minute through crontab makes this possible.
Here is an example shell script that does execute commands every 5 seconds:

#!/bin/bash
command1_to_exec='/bin/ls';
command2_to_exec='/bin/pwd';
for i in $(echo 1 2 3 4 5 6 7 8 9 10 11); do
sleep 5;
$command1_to_exec; $command2_to_exec;
done

This script will issue a sleep every 5 seconds and execute the two commands defined as $command1_to_exec and $command2_to_exec

Copy paste the script to a file or fetch exec_every_5_secs_cmds.sh from here

The script can easily be modified to execute on any seconds interval delay, the record to put on cron to use with this script should look something like:

# echo '* * * * * /path/to/exec_every_5_secs_cmds.sh' | crontab -

Where of course /path/to/exec_every_5_secs_cmds.sh needs to be modified to a proper script name and path location.

Another way to do the on a number of seconds program / command schedule without using cron at all is setting up an endless loop to run/refresh via /etc/inittab with a number of predefined commands inside. An example endless loop script to run via inittab would look something like:

while [ 1 ]; do
/bin/ls
sleep 5;
done

To run the above sample never ending script using inittab, one needs to add to the end of inittab, some line like:

mine:234:respawn:/path/to/script_name.sh

A quick way to add the line from consone would be with echo:

echo 'mine:234:respawn:/path/to/script' >> /etc/inittab

Of course the proper paths, should be put in:

Then to load up the newly added inittab line, inittab needs to be reloaded with cmd:

# init q

I've also red, some other methods suggested to run programs on a periodic seconds basis using just cron, what I found in stackoverflow.com's  as a thread proposed as a solution is:

* * * * * /foo/bar/your_script
* * * * * sleep 15; /foo/bar/your_script
* * * * * sleep 30; /foo/bar/your_script
* * * * * sleep 45; /foo/bar/your_script

One guy, even suggested a shorted way with cron:

0/15 * * * * * /path/to/my/script

The Living of Saint Peter and Saint Fevronia – a fascinating Russian cartoon retelling the saints story

Monday, March 26th, 2012

Reading Time: 4 minutes

Saint Peter and Fevronia Orthodox Christian saints protector of happy family, love and blessed marriage

The anime Living Story of Saint Peter and Saint Fevronia is a modern story remake of an ancient Church living of two bright Russian saints.
The official movie genre is orthodox christian kids animation movie.
The 14 minutes cartoon re-tolds the living story of St. Peter and st, Fevronia in a playful and entertaining way like for kids or youngsters.
Nomatter the movie primary target audience is children, the cartoon is great to see for adults people as well :).
The movie genre is orthodox christian kids animation movie.
The plot is based on a true (historic record) story of two saints venerated each year across Orthodox Churches around the world.

The original story I watched was a Bulgarian translation from Russian. But since I found it to be so valuable, I look for a translated video and got one in youtube.Take 14 minutes break and watch it, I'm sure you will like it so much, that probably give it a second time glimpse alone or with your wife, children or girlfriend.

Unfortunately, the english title is mis-translated as it says "Tale" and not "Story" and there is difference in meaning between this two words.
It is not tale as tale is made up story and this is not a made story but a story based on the two saints who lived in the end of 12 and beginning of the thirteen century.
Here is in short the real Church living:
The two saints were living in Murom Russia. Peter was prince and Fevronia a poor maid a daughter of a beekeeper who made his family living by collecting wild honey in the forest.

Prince Peter was striken by a severe sickness and in a vision it was revealed to him, that the only one that can cure him is Fevronia (a village maid living in the village of Laskovo Russia. The prince went to her and since he saw she is a pious, good and wisdom rich maid promised her, if she manage to heal him to take her as a bride to his place.
By her warm prayers to God and herbs, Fevronia succeeded in healing the prince sickness. Being fully restored st.Peter changed his mind and wanted to break his promise to marry her, cause the young made not part of the aristocratic Russian society. He didn't yet reached his home and the sickness, came back. This time with a deep repentance, he came back to Fevronia and she cured him again. Then the prince merried her and made her a princess of Murom
 

St. Peter and Fevronia Orthodox Church saints protector of marriage

However there love in Christ had to went through high temptations. Once the couple married, the prince proud boyars requested the prince to leave his new bride, as they didn't wanted to accept a simple girl as Fevronia will be governing them. Being in uneasy situation prince Peter prefered to leave his governing power and castle but to stay with his life. Together by boat by the near river Oka they left the kingdom. Soon after Gods wrath came Murom because of people's rebellion and the people requested the chased prince family to be restored to power.
Pushed by the peasents, the boyars bringed back the couple to power. The two saints governed their kingdom with great wisdom, love and mercy to the people.

In their old age the decided to become monks in separate monasteries. St. Peter received his new monk name David and princess Fevronia took the nun name Evphrosia (Evfrosia). Even living a sepate monk / nun life the couple continued having a deep love to each other and asked God to take them from this earthly life on the same date. God answered their prayer granting them to depart this earth on the same day in the same hour!
Like in life even in death people tried to separate them.
Fevronia was put in a coffin in the nun monastery, where Peter was prepared for a monk funeral in the man monastery and they put them in separate graves.
In the morning the graves were empty and their bodies were found buried together in one grave. People realized it is Gods will they are buried together and left them buried together. Today the incorruptable bodies of the two saints can be seen and venerated in Holy Trinity's nun monastery in the town of Murom Russia. St. Peter and St. Fevronia are considered patron of the Christian marriage, couple's love and family happiness.
It is common that many young people are, asking for the two saints prayer intercession in front of God for getting a good spouse in life and good marriage.

Also the two saints are oftenly asked for prayer for improving a marriege bindings.
The two saints feast day is like the Orthodox Antipode of the Roman Catholic feast of couples in love – St. Valentine.

As you see, St. Peter and St. Fevronia living is full of wisdom and true spirituality, and there is plenty we the modern disbelieving people can learn from it.
Let God by the two saints holy prayers have mercy on us.