1. Create Class TimertestImportJava.util.Timer;ImportJava.util.TimerTask; Public classTimertest {Private FinalTimer timer =NewTimer (); Public voidstart () {Timer.schedule (NewTimerTask () { Public voidrun () {System.out.println ("Timed Tasks"); } }, 0, 2 * 1000); }}2. Run Test class tests Public class Test { publicstaticvoid main (string[] args) { // TODO auto-generated Method Stub new Timertest (); Aa.start (); }}Java Task
131.240 in database
Configure Database
[NQSError: 46029] libclntsh. so.10.1: wrong ELF class: ELFCLASS64 Error
Specify the LD_LIBRARY_PATH = $ ORACLE_HOME/lib32 64bit library. Pay attention to the differences between 32bit and 64bit oracle and oraclebi.
NQSError: 17014 ORA-12154
Configure a local tnsnames. ora data source named 131.240, which is consistent with the DSN name in schconfig.
NQSError: 17014 incorrect ORA-01017 user name and password
Configure the database username and password in s
The first step is to go into the admin tool, find the Task Scheduler, and then open it and see that there are a lot of options on the main page, and then I click on the first folder under the program and it's easy to look at the picture.
And then came out of the subfolder of the page, there are a lot of features, and then I saw my computer service is not turned on, is disabled, and then I will be the service program features open, and then the la
Task by TIME Chip LUN practiceeg:while (1){if (task_delay[0]==0)Task1 ();if (task_delay[1]==0)Task2 ();}void Time0 (void) interrupt1{for (i=0;i{if (Task_delay[i])task_delay[i]--;}This structure is suitable for each task time below 10msIf the length of time as 18B20 initialization can be divided into multiple fragments ( state machine )eg:Case 0: ... Flag=1;Case 1:flag=2;The system is implemented by the priority levelwhile (1){for (i=0;i{if (task_delay[i]==0) {run (task[i]);}}Note the break !!!
Document directory
Defaultscheduler
First, let's take a look at the definition of the ischeduler interface, which mainly implements two interfaces: Prepare and schedule.
package backtype.storm.scheduler;import java.util.Map;public interface IScheduler { void prepare(Map conf); /** * Set assignments for the topologies which needs scheduling. The new assignments is available * through
Defaultscheduler
Defaultscheduler to implement the backtype. Storm.
view jobs managed by SCHEDULER, You can query them in two views: USER_SCHEDULER_JOB_LOG and USER_SCHEDULER_JOB_RUN_DETAILS.
RESTARTABLE: Specifies whether jobs can be restarted in due time after an error occurs during running. If this parameter is not explicitly specified during Task creation, it is set to FALSE by default. If it is set to TRUE, it indicates that an error occurs during task running and the task will still be started at the next ru
Compile a crontab scheduler task in the CentOS Environment
During host management, we often do some things every day. To avoid manual operations every time, we can write scheduled tasks to automatically execute the host periodically according to the schedule.
Install and startUnder CentOS:
Yum install vixie-cronYum install crontabsThe former is usually installed on the latter.Start the service.
Service crond startYou must start the service.
System-lev
SST-Structure Analysis of super simple task schedulerSST (Super Simple Task) is a Super Simple Task scheduler based on Task priority, preemptible, event-driven, RTC, and single stack. It is based on the idea of Rober Ward, miro Samek is implemented by re-programming in C. It is the basic idea of QK in QP. QK, the method for processing state machine events (QEP), the task registration and event storage and distribution functions (QF), the serial port d
Run the yum command in CentOS to install the crontab program of the scheduler.Overview
With the "Task Scheduler", you can schedule any script, program, or document to run at a very convenient time. In general, it is to regularly execute a script or program.Common usage
Timed ShutdownRegular check for updatesRegularly back up system configurations, databases, and logsRegular cleanup of junk filesCheck whether the installation is complete.
# crontab-bas
practice this content.
Screenshots show how you use unit test of Vs to ensure the quality of the classes you write. Show unit test's coverage for your written class
Draw a UML diagram to show the relationships between entities (just draw a diagram)
Describes the key of your algorithm (without listing the source code) and its uniqueness.
Actually, there is nothing in the algorithm ...... And have no unique features. Because I was preparing to write a kind of intelligent elevator at the beginn
Virtual Web Host:Build LNMP ServiceInstallationNginxMARIADB, Mariadb-server, Mariadb-develPHP, PHP-FPM, Php-mysqlStart Nginx, MariaDB, FPM service;and test whether the LNMP is working properly.Build two Web services with different domain namesProxy Server:Build Nginx Service#vim/usr/local/nginx/conf/nginx.conf......HTTP {Server_tokens off;Client_header_buffer_size 1k;Large_client_header_buffers 4 4k;Include Mime.types;Default_type Application/octet-stream;Upstream Web {Server 201.1.2.100 weight=
/bin/run-parts, functions to execute all scripts/programs in a directory.Run-parts/etc/cron.hourly executes all scripts/programs under directory/etc/cron.hourly/.Run-parts below is the command to runThe first line means: 65 minutes a day after the boot to check whether the cron.daily file is executed, if not executed today to execute hisThe second line means: Every 7 days after the boot 70 minutes to check whether the cron.weekly file is executed, if not executed within a week to execute hisAnd
-mm-dd-hh-mm- SS;2 * * 7/bin/cp-a/etc/fstab/backup/fstab-' date +f '12 o'clock every night, get all lines in the/proc/meminfo file that begin with S or M, append to the/statistics/meminfo.txt file, and precede the daily message with a similar =============== separator line[[email protected] ~]# mkdir-pv/statisticsmkdir:created directory '/statistics ' 0 0 * * */bin/echo-e "===========\n" >>/statistics/meminfo.txt /bin/grep "^[s| M] "/proc/meminfo >>/statistics/meminfo.txtHow to use the Task
; default management of their own;-l:list, list the tasks;-r:remove to remove all tasks;-e:edit, edit, open a default editor for the current shell session to edit the cron task table;Ctrl+d Submitting a taskExample: I write to/etc/crontab1, every Monday to Saturday 3:20 A.M., run the CP command to archive the/etc/directory, storage location is/BACKUPS/ETC-YYYY-MM-DD;3 * * 1-6 root/bin/cp-a/etc//backups/etc-' date +%f ' >/dev/null 2>12, every Sunday 2:30 A.M., run the CP command to backup the/etc
protected] ~]# CRONTAB-L20 3 * * 1-6/bin/cp/etc-rpf/backups/etc-' file\%y-\%m-\%d 'title: Every Sunday wee 2 minutes, run the CP command to backup the/etc/fstab file, storage location is /backup/ Fstab-yyyy-mm-dd-hh-mm-ss[[email protected] ~]# CRONTAB-L30 2 * * 7/bin/cp/etc/fstab/backup/fstab-' file\%y-\%m-\%d-\%h-\%m-\%s 'q : every night , get all lines starting with S or M in the/proc/meminfo file , append to /statistics/ Meminfo.txt file, and the daily message is preceded by a similar =====
notation:1. Specific time: All valid values in the range of valid values for a given point in time;0 5 3 9 *2. Wildcard Time: *, meaning "every ..." means, all valid values at a given point in time;* * * * *3. Discrete time: At a given point in time, use commas to separate;0 8,20 * * 1,3,54. Continuous time: At a given point in time, use a minus sign to separate;0 8 * 1-55. Step time: At a given point in time, use division sign to separate;*/2 * * * **/7 * * * * This method does not implement s
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.