/**
* Implements hook_cron_job_scheduler_info().
*/
function drills_custom_feeds_cron_job_scheduler_info()
{
$schedulers = array();
$schedulers['chinese_sentence_import_scheduler'] = array(
'worker callback' => 'chinese_sentence_import', // タスク内容のコールバック
);
return $schedulers;
}
function chinese_sentence_import($job) {
// 実際のタスク処理ロジック
}
//Add a job.
$job = array(
'type' => 'story', // 任意の識別名
'id' => 20170309, // 任意のID(例:日付)
'period' => 3600, // 実行開始時間(例:3600秒後から実行)
'periodic' => FALSE, // 周期的に実行か(FALSE:一回のみ、TRUE:周期的)
);
JobScheduler::get('chinese_sentence_import_scheduler')->set($job);
JobScheduler::get('chinese_sentence_import_scheduler')->dispath($job);
// バッチ定義の配列
$batch=array{
'title' => t('バッチのタイトル'), // バッチの名前
'operations' => array(), // オペレーション配列
'finished' => 'import_finished_callback', //終了時のコールバック関数
'progress_message' => t('Finished @current out of @total.'), // 状態表示
}
// オペレーション配列の定義
$batch['operations'][] = array('batch_operation_function_1', array( [引数が無ければ、空の配列] ) );
$batch['operations'][] = array('batch_operation_function_2', array( $arg_1, $arg_2 ) );
・・・・・・
// バッチの実行
batch_set($batch);
// オペレーション関数
function batch_operation_function($arg_1, $arg_2, &$context){
// バッチ内の処理
}
/**
* Implements hook_cron_job_scheduler_info().
*/
function drills_custom_feeds_cron_job_scheduler_info()
{
$schedulers = array();
$schedulers['chinese_sentence_import_scheduler'] = array(
'worker callback' => 'chinese_sentence_import', // タスク内容のコールバック
);
return $schedulers;
}
function chinese_sentence_import($job) {
// 実際のタスク処理ロジック
}
//Add a job.
$job = array(
'type' => 'story', // 任意の識別名
'id' => 20170309, // 任意のID(例:日付)
'period' => 3600, // 実行開始時間(例:3600秒後から実行)
'periodic' => FALSE, // 周期的に実行か(FALSE:一回のみ、TRUE:周期的)
);
JobScheduler::get('chinese_sentence_import_scheduler')->set($job);
JobScheduler::get('chinese_sentence_import_scheduler')->dispath($job);
// バッチ定義の配列
$batch=array{
'title' => t('バッチのタイトル'), // バッチの名前
'operations' => array(), // オペレーション配列
'finished' => 'import_finished_callback', //終了時のコールバック関数
'progress_message' => t('Finished @current out of @total.'), // 状態表示
}
// オペレーション配列の定義
$batch['operations'][] = array('batch_operation_function_1', array( [引数が無ければ、空の配列] ) );
$batch['operations'][] = array('batch_operation_function_2', array( $arg_1, $arg_2 ) );
・・・・・・
// バッチの実行
batch_set($batch);
// オペレーション関数
function batch_operation_function($arg_1, $arg_2, &$context){
// バッチ内の処理
}
/**
* Implements hook_cron_job_scheduler_info().
*/
function drills_custom_feeds_cron_job_scheduler_info()
{
$schedulers = array();
$schedulers['chinese_sentence_import_scheduler'] = array(
'worker callback' => 'chinese_sentence_import', // タスク内容のコールバック
);
return $schedulers;
}
function chinese_sentence_import($job) {
// 実際のタスク処理ロジック
}
//Add a job.
$job = array(
'type' => 'story', // 任意の識別名
'id' => 20170309, // 任意のID(例:日付)
'period' => 3600, // 実行開始時間(例:3600秒後から実行)
'periodic' => FALSE, // 周期的に実行か(FALSE:一回のみ、TRUE:周期的)
);
JobScheduler::get('chinese_sentence_import_scheduler')->set($job);
JobScheduler::get('chinese_sentence_import_scheduler')->dispath($job);
// バッチ定義の配列
$batch=array{
'title' => t('バッチのタイトル'), // バッチの名前
'operations' => array(), // オペレーション配列
'finished' => 'import_finished_callback', //終了時のコールバック関数
'progress_message' => t('Finished @current out of @total.'), // 状態表示
}
// オペレーション配列の定義
$batch['operations'][] = array('batch_operation_function_1', array( [引数が無ければ、空の配列] ) );
$batch['operations'][] = array('batch_operation_function_2', array( $arg_1, $arg_2 ) );
・・・・・・
// バッチの実行
batch_set($batch);
// オペレーション関数
function batch_operation_function($arg_1, $arg_2, &$context){
// バッチ内の処理
}
/**
* Implements hook_cron_job_scheduler_info().
*/
function drills_custom_feeds_cron_job_scheduler_info()
{
$schedulers = array();
$schedulers['chinese_sentence_import_scheduler'] = array(
'worker callback' => 'chinese_sentence_import', // タスク内容のコールバック
);
return $schedulers;
}
function chinese_sentence_import($job) {
// 実際のタスク処理ロジック
}
//Add a job.
$job = array(
'type' => 'story', // 任意の識別名
'id' => 20170309, // 任意のID(例:日付)
'period' => 3600, // 実行開始時間(例:3600秒後から実行)
'periodic' => FALSE, // 周期的に実行か(FALSE:一回のみ、TRUE:周期的)
);
JobScheduler::get('chinese_sentence_import_scheduler')->set($job);
JobScheduler::get('chinese_sentence_import_scheduler')->dispath($job);
// バッチ定義の配列
$batch=array{
'title' => t('バッチのタイトル'), // バッチの名前
'operations' => array(), // オペレーション配列
'finished' => 'import_finished_callback', //終了時のコールバック関数
'progress_message' => t('Finished @current out of @total.'), // 状態表示
}
// オペレーション配列の定義
$batch['operations'][] = array('batch_operation_function_1', array( [引数が無ければ、空の配列] ) );
$batch['operations'][] = array('batch_operation_function_2', array( $arg_1, $arg_2 ) );
・・・・・・
// バッチの実行
batch_set($batch);
// オペレーション関数
function batch_operation_function($arg_1, $arg_2, &$context){
// バッチ内の処理
}
/**
* Implements hook_cron_job_scheduler_info().
*/
function drills_custom_feeds_cron_job_scheduler_info()
{
$schedulers = array();
$schedulers['chinese_sentence_import_scheduler'] = array(
'worker callback' => 'chinese_sentence_import', // タスク内容のコールバック
);
return $schedulers;
}
function chinese_sentence_import($job) {
// 実際のタスク処理ロジック
}
//Add a job.
$job = array(
'type' => 'story', // 任意の識別名
'id' => 20170309, // 任意のID(例:日付)
'period' => 3600, // 実行開始時間(例:3600秒後から実行)
'periodic' => FALSE, // 周期的に実行か(FALSE:一回のみ、TRUE:周期的)
);
JobScheduler::get('chinese_sentence_import_scheduler')->set($job);
JobScheduler::get('chinese_sentence_import_scheduler')->dispath($job);
// バッチ定義の配列
$batch=array{
'title' => t('バッチのタイトル'), // バッチの名前
'operations' => array(), // オペレーション配列
'finished' => 'import_finished_callback', //終了時のコールバック関数
'progress_message' => t('Finished @current out of @total.'), // 状態表示
}
// オペレーション配列の定義
$batch['operations'][] = array('batch_operation_function_1', array( [引数が無ければ、空の配列] ) );
$batch['operations'][] = array('batch_operation_function_2', array( $arg_1, $arg_2 ) );
・・・・・・
// バッチの実行
batch_set($batch);
// オペレーション関数
function batch_operation_function($arg_1, $arg_2, &$context){
// バッチ内の処理
}
/**
* Implements hook_cron_job_scheduler_info().
*/
function drills_custom_feeds_cron_job_scheduler_info()
{
$schedulers = array();
$schedulers['chinese_sentence_import_scheduler'] = array(
'worker callback' => 'chinese_sentence_import', // タスク内容のコールバック
);
return $schedulers;
}
function chinese_sentence_import($job) {
// 実際のタスク処理ロジック
}
//Add a job.
$job = array(
'type' => 'story', // 任意の識別名
'id' => 20170309, // 任意のID(例:日付)
'period' => 3600, // 実行開始時間(例:3600秒後から実行)
'periodic' => FALSE, // 周期的に実行か(FALSE:一回のみ、TRUE:周期的)
);
JobScheduler::get('chinese_sentence_import_scheduler')->set($job);
JobScheduler::get('chinese_sentence_import_scheduler')->dispath($job);
// バッチ定義の配列
$batch=array{
'title' => t('バッチのタイトル'), // バッチの名前
'operations' => array(), // オペレーション配列
'finished' => 'import_finished_callback', //終了時のコールバック関数
'progress_message' => t('Finished @current out of @total.'), // 状態表示
}
// オペレーション配列の定義
$batch['operations'][] = array('batch_operation_function_1', array( [引数が無ければ、空の配列] ) );
$batch['operations'][] = array('batch_operation_function_2', array( $arg_1, $arg_2 ) );
・・・・・・
// バッチの実行
batch_set($batch);
// オペレーション関数
function batch_operation_function($arg_1, $arg_2, &$context){
// バッチ内の処理
}
/**
* Implements hook_cron_job_scheduler_info().
*/
function drills_custom_feeds_cron_job_scheduler_info()
{
$schedulers = array();
$schedulers['chinese_sentence_import_scheduler'] = array(
'worker callback' => 'chinese_sentence_import', // タスク内容のコールバック
);
return $schedulers;
}
function chinese_sentence_import($job) {
// 実際のタスク処理ロジック
}
//Add a job.
$job = array(
'type' => 'story', // 任意の識別名
'id' => 20170309, // 任意のID(例:日付)
'period' => 3600, // 実行開始時間(例:3600秒後から実行)
'periodic' => FALSE, // 周期的に実行か(FALSE:一回のみ、TRUE:周期的)
);
JobScheduler::get('chinese_sentence_import_scheduler')->set($job);
JobScheduler::get('chinese_sentence_import_scheduler')->dispath($job);
// バッチ定義の配列
$batch=array{
'title' => t('バッチのタイトル'), // バッチの名前
'operations' => array(), // オペレーション配列
'finished' => 'import_finished_callback', //終了時のコールバック関数
'progress_message' => t('Finished @current out of @total.'), // 状態表示
}
// オペレーション配列の定義
$batch['operations'][] = array('batch_operation_function_1', array( [引数が無ければ、空の配列] ) );
$batch['operations'][] = array('batch_operation_function_2', array( $arg_1, $arg_2 ) );
・・・・・・
// バッチの実行
batch_set($batch);
// オペレーション関数
function batch_operation_function($arg_1, $arg_2, &$context){
// バッチ内の処理
}
/**
* Implements hook_cron_job_scheduler_info().
*/
function drills_custom_feeds_cron_job_scheduler_info()
{
$schedulers = array();
$schedulers['chinese_sentence_import_scheduler'] = array(
'worker callback' => 'chinese_sentence_import', // タスク内容のコールバック
);
return $schedulers;
}
function chinese_sentence_import($job) {
// 実際のタスク処理ロジック
}
//Add a job.
$job = array(
'type' => 'story', // 任意の識別名
'id' => 20170309, // 任意のID(例:日付)
'period' => 3600, // 実行開始時間(例:3600秒後から実行)
'periodic' => FALSE, // 周期的に実行か(FALSE:一回のみ、TRUE:周期的)
);
JobScheduler::get('chinese_sentence_import_scheduler')->set($job);
JobScheduler::get('chinese_sentence_import_scheduler')->dispath($job);
// バッチ定義の配列
$batch=array{
'title' => t('バッチのタイトル'), // バッチの名前
'operations' => array(), // オペレーション配列
'finished' => 'import_finished_callback', //終了時のコールバック関数
'progress_message' => t('Finished @current out of @total.'), // 状態表示
}
// オペレーション配列の定義
$batch['operations'][] = array('batch_operation_function_1', array( [引数が無ければ、空の配列] ) );
$batch['operations'][] = array('batch_operation_function_2', array( $arg_1, $arg_2 ) );
・・・・・・
// バッチの実行
batch_set($batch);
// オペレーション関数
function batch_operation_function($arg_1, $arg_2, &$context){
// バッチ内の処理
}
/**
* Implements hook_cron_job_scheduler_info().
*/
function drills_custom_feeds_cron_job_scheduler_info()
{
$schedulers = array();
$schedulers['chinese_sentence_import_scheduler'] = array(
'worker callback' => 'chinese_sentence_import', // タスク内容のコールバック
);
return $schedulers;
}
function chinese_sentence_import($job) {
// 実際のタスク処理ロジック
}
//Add a job.
$job = array(
'type' => 'story', // 任意の識別名
'id' => 20170309, // 任意のID(例:日付)
'period' => 3600, // 実行開始時間(例:3600秒後から実行)
'periodic' => FALSE, // 周期的に実行か(FALSE:一回のみ、TRUE:周期的)
);
JobScheduler::get('chinese_sentence_import_scheduler')->set($job);
JobScheduler::get('chinese_sentence_import_scheduler')->dispath($job);
// バッチ定義の配列
$batch=array{
'title' => t('バッチのタイトル'), // バッチの名前
'operations' => array(), // オペレーション配列
'finished' => 'import_finished_callback', //終了時のコールバック関数
'progress_message' => t('Finished @current out of @total.'), // 状態表示
}
// オペレーション配列の定義
$batch['operations'][] = array('batch_operation_function_1', array( [引数が無ければ、空の配列] ) );
$batch['operations'][] = array('batch_operation_function_2', array( $arg_1, $arg_2 ) );
・・・・・・
// バッチの実行
batch_set($batch);
// オペレーション関数
function batch_operation_function($arg_1, $arg_2, &$context){
// バッチ内の処理
}
/**
* Implements hook_cron_job_scheduler_info().
*/
function drills_custom_feeds_cron_job_scheduler_info()
{
$schedulers = array();
$schedulers['chinese_sentence_import_scheduler'] = array(
'worker callback' => 'chinese_sentence_import', // タスク内容のコールバック
);
return $schedulers;
}
function chinese_sentence_import($job) {
// 実際のタスク処理ロジック
}
//Add a job.
$job = array(
'type' => 'story', // 任意の識別名
'id' => 20170309, // 任意のID(例:日付)
'period' => 3600, // 実行開始時間(例:3600秒後から実行)
'periodic' => FALSE, // 周期的に実行か(FALSE:一回のみ、TRUE:周期的)
);
JobScheduler::get('chinese_sentence_import_scheduler')->set($job);
JobScheduler::get('chinese_sentence_import_scheduler')->dispath($job);
// バッチ定義の配列
$batch=array{
'title' => t('バッチのタイトル'), // バッチの名前
'operations' => array(), // オペレーション配列
'finished' => 'import_finished_callback', //終了時のコールバック関数
'progress_message' => t('Finished @current out of @total.'), // 状態表示
}
// オペレーション配列の定義
$batch['operations'][] = array('batch_operation_function_1', array( [引数が無ければ、空の配列] ) );
$batch['operations'][] = array('batch_operation_function_2', array( $arg_1, $arg_2 ) );
・・・・・・
// バッチの実行
batch_set($batch);
// オペレーション関数
function batch_operation_function($arg_1, $arg_2, &$context){
// バッチ内の処理
}
/**
* Implements hook_cron_job_scheduler_info().
*/
function drills_custom_feeds_cron_job_scheduler_info()
{
$schedulers = array();
$schedulers['chinese_sentence_import_scheduler'] = array(
'worker callback' => 'chinese_sentence_import', // タスク内容のコールバック
);
return $schedulers;
}
function chinese_sentence_import($job) {
// 実際のタスク処理ロジック
}
//Add a job.
$job = array(
'type' => 'story', // 任意の識別名
'id' => 20170309, // 任意のID(例:日付)
'period' => 3600, // 実行開始時間(例:3600秒後から実行)
'periodic' => FALSE, // 周期的に実行か(FALSE:一回のみ、TRUE:周期的)
);
JobScheduler::get('chinese_sentence_import_scheduler')->set($job);
JobScheduler::get('chinese_sentence_import_scheduler')->dispath($job);
// バッチ定義の配列
$batch=array{
'title' => t('バッチのタイトル'), // バッチの名前
'operations' => array(), // オペレーション配列
'finished' => 'import_finished_callback', //終了時のコールバック関数
'progress_message' => t('Finished @current out of @total.'), // 状態表示
}
// オペレーション配列の定義
$batch['operations'][] = array('batch_operation_function_1', array( [引数が無ければ、空の配列] ) );
$batch['operations'][] = array('batch_operation_function_2', array( $arg_1, $arg_2 ) );
・・・・・・
// バッチの実行
batch_set($batch);
// オペレーション関数
function batch_operation_function($arg_1, $arg_2, &$context){
// バッチ内の処理
}
/**
* Implements hook_cron_job_scheduler_info().
*/
function drills_custom_feeds_cron_job_scheduler_info()
{
$schedulers = array();
$schedulers['chinese_sentence_import_scheduler'] = array(
'worker callback' => 'chinese_sentence_import', // タスク内容のコールバック
);
return $schedulers;
}
function chinese_sentence_import($job) {
// 実際のタスク処理ロジック
}
//Add a job.
$job = array(
'type' => 'story', // 任意の識別名
'id' => 20170309, // 任意のID(例:日付)
'period' => 3600, // 実行開始時間(例:3600秒後から実行)
'periodic' => FALSE, // 周期的に実行か(FALSE:一回のみ、TRUE:周期的)
);
JobScheduler::get('chinese_sentence_import_scheduler')->set($job);
JobScheduler::get('chinese_sentence_import_scheduler')->dispath($job);
// バッチ定義の配列
$batch=array{
'title' => t('バッチのタイトル'), // バッチの名前
'operations' => array(), // オペレーション配列
'finished' => 'import_finished_callback', //終了時のコールバック関数
'progress_message' => t('Finished @current out of @total.'), // 状態表示
}
// オペレーション配列の定義
$batch['operations'][] = array('batch_operation_function_1', array( [引数が無ければ、空の配列] ) );
$batch['operations'][] = array('batch_operation_function_2', array( $arg_1, $arg_2 ) );
・・・・・・
// バッチの実行
batch_set($batch);
// オペレーション関数
function batch_operation_function($arg_1, $arg_2, &$context){
// バッチ内の処理
}
/**
* Implements hook_cron_job_scheduler_info().
*/
function drills_custom_feeds_cron_job_scheduler_info()
{
$schedulers = array();
$schedulers['chinese_sentence_import_scheduler'] = array(
'worker callback' => 'chinese_sentence_import', // タスク内容のコールバック
);
return $schedulers;
}
function chinese_sentence_import($job) {
// 実際のタスク処理ロジック
}
//Add a job.
$job = array(
'type' => 'story', // 任意の識別名
'id' => 20170309, // 任意のID(例:日付)
'period' => 3600, // 実行開始時間(例:3600秒後から実行)
'periodic' => FALSE, // 周期的に実行か(FALSE:一回のみ、TRUE:周期的)
);
JobScheduler::get('chinese_sentence_import_scheduler')->set($job);
JobScheduler::get('chinese_sentence_import_scheduler')->dispath($job);
// バッチ定義の配列
$batch=array{
'title' => t('バッチのタイトル'), // バッチの名前
'operations' => array(), // オペレーション配列
'finished' => 'import_finished_callback', //終了時のコールバック関数
'progress_message' => t('Finished @current out of @total.'), // 状態表示
}
// オペレーション配列の定義
$batch['operations'][] = array('batch_operation_function_1', array( [引数が無ければ、空の配列] ) );
$batch['operations'][] = array('batch_operation_function_2', array( $arg_1, $arg_2 ) );
・・・・・・
// バッチの実行
batch_set($batch);
// オペレーション関数
function batch_operation_function($arg_1, $arg_2, &$context){
// バッチ内の処理
}
/**
* Implements hook_cron_job_scheduler_info().
*/
function drills_custom_feeds_cron_job_scheduler_info()
{
$schedulers = array();
$schedulers['chinese_sentence_import_scheduler'] = array(
'worker callback' => 'chinese_sentence_import', // タスク内容のコールバック
);
return $schedulers;
}
function chinese_sentence_import($job) {
// 実際のタスク処理ロジック
}
//Add a job.
$job = array(
'type' => 'story', // 任意の識別名
'id' => 20170309, // 任意のID(例:日付)
'period' => 3600, // 実行開始時間(例:3600秒後から実行)
'periodic' => FALSE, // 周期的に実行か(FALSE:一回のみ、TRUE:周期的)
);
JobScheduler::get('chinese_sentence_import_scheduler')->set($job);
JobScheduler::get('chinese_sentence_import_scheduler')->dispath($job);
// バッチ定義の配列
$batch=array{
'title' => t('バッチのタイトル'), // バッチの名前
'operations' => array(), // オペレーション配列
'finished' => 'import_finished_callback', //終了時のコールバック関数
'progress_message' => t('Finished @current out of @total.'), // 状態表示
}
// オペレーション配列の定義
$batch['operations'][] = array('batch_operation_function_1', array( [引数が無ければ、空の配列] ) );
$batch['operations'][] = array('batch_operation_function_2', array( $arg_1, $arg_2 ) );
・・・・・・
// バッチの実行
batch_set($batch);
// オペレーション関数
function batch_operation_function($arg_1, $arg_2, &$context){
// バッチ内の処理
}
/**
* Implements hook_cron_job_scheduler_info().
*/
function drills_custom_feeds_cron_job_scheduler_info()
{
$schedulers = array();
$schedulers['chinese_sentence_import_scheduler'] = array(
'worker callback' => 'chinese_sentence_import', // タスク内容のコールバック
);
return $schedulers;
}
function chinese_sentence_import($job) {
// 実際のタスク処理ロジック
}
//Add a job.
$job = array(
'type' => 'story', // 任意の識別名
'id' => 20170309, // 任意のID(例:日付)
'period' => 3600, // 実行開始時間(例:3600秒後から実行)
'periodic' => FALSE, // 周期的に実行か(FALSE:一回のみ、TRUE:周期的)
);
JobScheduler::get('chinese_sentence_import_scheduler')->set($job);
JobScheduler::get('chinese_sentence_import_scheduler')->dispath($job);
// バッチ定義の配列
$batch=array{
'title' => t('バッチのタイトル'), // バッチの名前
'operations' => array(), // オペレーション配列
'finished' => 'import_finished_callback', //終了時のコールバック関数
'progress_message' => t('Finished @current out of @total.'), // 状態表示
}
// オペレーション配列の定義
$batch['operations'][] = array('batch_operation_function_1', array( [引数が無ければ、空の配列] ) );
$batch['operations'][] = array('batch_operation_function_2', array( $arg_1, $arg_2 ) );
・・・・・・
// バッチの実行
batch_set($batch);
// オペレーション関数
function batch_operation_function($arg_1, $arg_2, &$context){
// バッチ内の処理
}
/**
* Implements hook_cron_job_scheduler_info().
*/
function drills_custom_feeds_cron_job_scheduler_info()
{
$schedulers = array();
$schedulers['chinese_sentence_import_scheduler'] = array(
'worker callback' => 'chinese_sentence_import', // タスク内容のコールバック
);
return $schedulers;
}
function chinese_sentence_import($job) {
// 実際のタスク処理ロジック
}
//Add a job.
$job = array(
'type' => 'story', // 任意の識別名
'id' => 20170309, // 任意のID(例:日付)
'period' => 3600, // 実行開始時間(例:3600秒後から実行)
'periodic' => FALSE, // 周期的に実行か(FALSE:一回のみ、TRUE:周期的)
);
JobScheduler::get('chinese_sentence_import_scheduler')->set($job);
JobScheduler::get('chinese_sentence_import_scheduler')->dispath($job);
// バッチ定義の配列
$batch=array{
'title' => t('バッチのタイトル'), // バッチの名前
'operations' => array(), // オペレーション配列
'finished' => 'import_finished_callback', //終了時のコールバック関数
'progress_message' => t('Finished @current out of @total.'), // 状態表示
}
// オペレーション配列の定義
$batch['operations'][] = array('batch_operation_function_1', array( [引数が無ければ、空の配列] ) );
$batch['operations'][] = array('batch_operation_function_2', array( $arg_1, $arg_2 ) );
・・・・・・
// バッチの実行
batch_set($batch);
// オペレーション関数
function batch_operation_function($arg_1, $arg_2, &$context){
// バッチ内の処理
}
/**
* Implements hook_cron_job_scheduler_info().
*/
function drills_custom_feeds_cron_job_scheduler_info()
{
$schedulers = array();
$schedulers['chinese_sentence_import_scheduler'] = array(
'worker callback' => 'chinese_sentence_import', // タスク内容のコールバック
);
return $schedulers;
}
function chinese_sentence_import($job) {
// 実際のタスク処理ロジック
}
//Add a job.
$job = array(
'type' => 'story', // 任意の識別名
'id' => 20170309, // 任意のID(例:日付)
'period' => 3600, // 実行開始時間(例:3600秒後から実行)
'periodic' => FALSE, // 周期的に実行か(FALSE:一回のみ、TRUE:周期的)
);
JobScheduler::get('chinese_sentence_import_scheduler')->set($job);
JobScheduler::get('chinese_sentence_import_scheduler')->dispath($job);
// バッチ定義の配列
$batch=array{
'title' => t('バッチのタイトル'), // バッチの名前
'operations' => array(), // オペレーション配列
'finished' => 'import_finished_callback', //終了時のコールバック関数
'progress_message' => t('Finished @current out of @total.'), // 状態表示
}
// オペレーション配列の定義
$batch['operations'][] = array('batch_operation_function_1', array( [引数が無ければ、空の配列] ) );
$batch['operations'][] = array('batch_operation_function_2', array( $arg_1, $arg_2 ) );
・・・・・・
// バッチの実行
batch_set($batch);
// オペレーション関数
function batch_operation_function($arg_1, $arg_2, &$context){
// バッチ内の処理
}
/**
* Implements hook_cron_job_scheduler_info().
*/
function drills_custom_feeds_cron_job_scheduler_info()
{
$schedulers = array();
$schedulers['chinese_sentence_import_scheduler'] = array(
'worker callback' => 'chinese_sentence_import', // タスク内容のコールバック
);
return $schedulers;
}
function chinese_sentence_import($job) {
// 実際のタスク処理ロジック
}
//Add a job.
$job = array(
'type' => 'story', // 任意の識別名
'id' => 20170309, // 任意のID(例:日付)
'period' => 3600, // 実行開始時間(例:3600秒後から実行)
'periodic' => FALSE, // 周期的に実行か(FALSE:一回のみ、TRUE:周期的)
);
JobScheduler::get('chinese_sentence_import_scheduler')->set($job);
JobScheduler::get('chinese_sentence_import_scheduler')->dispath($job);
// バッチ定義の配列
$batch=array{
'title' => t('バッチのタイトル'), // バッチの名前
'operations' => array(), // オペレーション配列
'finished' => 'import_finished_callback', //終了時のコールバック関数
'progress_message' => t('Finished @current out of @total.'), // 状態表示
}
// オペレーション配列の定義
$batch['operations'][] = array('batch_operation_function_1', array( [引数が無ければ、空の配列] ) );
$batch['operations'][] = array('batch_operation_function_2', array( $arg_1, $arg_2 ) );
・・・・・・
// バッチの実行
batch_set($batch);
// オペレーション関数
function batch_operation_function($arg_1, $arg_2, &$context){
// バッチ内の処理
}
/**
* Implements hook_cron_job_scheduler_info().
*/
function drills_custom_feeds_cron_job_scheduler_info()
{
$schedulers = array();
$schedulers['chinese_sentence_import_scheduler'] = array(
'worker callback' => 'chinese_sentence_import', // タスク内容のコールバック
);
return $schedulers;
}
function chinese_sentence_import($job) {
// 実際のタスク処理ロジック
}
//Add a job.
$job = array(
'type' => 'story', // 任意の識別名
'id' => 20170309, // 任意のID(例:日付)
'period' => 3600, // 実行開始時間(例:3600秒後から実行)
'periodic' => FALSE, // 周期的に実行か(FALSE:一回のみ、TRUE:周期的)
);
JobScheduler::get('chinese_sentence_import_scheduler')->set($job);
JobScheduler::get('chinese_sentence_import_scheduler')->dispath($job);
// バッチ定義の配列
$batch=array{
'title' => t('バッチのタイトル'), // バッチの名前
'operations' => array(), // オペレーション配列
'finished' => 'import_finished_callback', //終了時のコールバック関数
'progress_message' => t('Finished @current out of @total.'), // 状態表示
}
// オペレーション配列の定義
$batch['operations'][] = array('batch_operation_function_1', array( [引数が無ければ、空の配列] ) );
$batch['operations'][] = array('batch_operation_function_2', array( $arg_1, $arg_2 ) );
・・・・・・
// バッチの実行
batch_set($batch);
// オペレーション関数
function batch_operation_function($arg_1, $arg_2, &$context){
// バッチ内の処理
}
/**
* Implements hook_cron_job_scheduler_info().
*/
function drills_custom_feeds_cron_job_scheduler_info()
{
$schedulers = array();
$schedulers['chinese_sentence_import_scheduler'] = array(
'worker callback' => 'chinese_sentence_import', // タスク内容のコールバック
);
return $schedulers;
}
function chinese_sentence_import($job) {
// 実際のタスク処理ロジック
}
//Add a job.
$job = array(
'type' => 'story', // 任意の識別名
'id' => 20170309, // 任意のID(例:日付)
'period' => 3600, // 実行開始時間(例:3600秒後から実行)
'periodic' => FALSE, // 周期的に実行か(FALSE:一回のみ、TRUE:周期的)
);
JobScheduler::get('chinese_sentence_import_scheduler')->set($job);
JobScheduler::get('chinese_sentence_import_scheduler')->dispath($job);
// バッチ定義の配列
$batch=array{
'title' => t('バッチのタイトル'), // バッチの名前
'operations' => array(), // オペレーション配列
'finished' => 'import_finished_callback', //終了時のコールバック関数
'progress_message' => t('Finished @current out of @total.'), // 状態表示
}
// オペレーション配列の定義
$batch['operations'][] = array('batch_operation_function_1', array( [引数が無ければ、空の配列] ) );
$batch['operations'][] = array('batch_operation_function_2', array( $arg_1, $arg_2 ) );
・・・・・・
// バッチの実行
batch_set($batch);
// オペレーション関数
function batch_operation_function($arg_1, $arg_2, &$context){
// バッチ内の処理
}
/**
* Implements hook_cron_job_scheduler_info().
*/
function drills_custom_feeds_cron_job_scheduler_info()
{
$schedulers = array();
$schedulers['chinese_sentence_import_scheduler'] = array(
'worker callback' => 'chinese_sentence_import', // タスク内容のコールバック
);
return $schedulers;
}
function chinese_sentence_import($job) {
// 実際のタスク処理ロジック
}
//Add a job.
$job = array(
'type' => 'story', // 任意の識別名
'id' => 20170309, // 任意のID(例:日付)
'period' => 3600, // 実行開始時間(例:3600秒後から実行)
'periodic' => FALSE, // 周期的に実行か(FALSE:一回のみ、TRUE:周期的)
);
JobScheduler::get('chinese_sentence_import_scheduler')->set($job);
JobScheduler::get('chinese_sentence_import_scheduler')->dispath($job);