وظيفة كرون
A cron job is a Linux command for scheduling a command or script on your server to complete repetitive tasks automatically. Scripts executed as a cron job are typically used to modify files or databases; however, they can perform other tasks that do not modify data on the server, like sending out email notifications. Koha has many cron jobs in place that you can enable (search engine indexing, overdue notice generation, data cleanup and more), this chapter will explain those for you.
Crontab example
An example of a Koha crontab can be found in misc/cronjobs/crontab.example
The example includes sample boilerplate cronjob entries for the most commonly-used cronjobs.
وظيفة كرون
المواقع أدناه تفرض تنصيب dev الذي يضع الكرون في misc/, إذا كان لديك تنصيب قياسي قد ترغب في في النظر في bin/ لهذه الملفات إذا كنت لاتستطيع العثور على misc/.
Backup
Daily Backup
Script path: misc/cronjobs/backup.sh
Does: Creates a daily backup of the Koha database.
إقتراح التردد : يومياً
البحث
Sitemap
Script path: misc/cronjobs/sitemap.pl
Does: Processes all biblio records from a Koha instance and generates sitemap files complying with the protocol as described on http://sitemaps.org. The goal of this script is to be able to provide to search engines direct access to biblio records. It avoids leaving search engines browsing Koha's OPAC which would generate a lot of site traffic and server workload.
Note A file named sitemapindex.xml is generated. It contains references to multiple sitemap files. Each file contains at most 50,000 URLs and is named sitemapXXXX.xml.
The files must be stored on the Koha OPAC's root directory. In the same directory a robots.txt file with the following contents is required:
Sitemap: sitemapindex.xml User-agent: * Disallow: /cgi-bin/
إعادة بناء الفهرس
Script path: misc/migration_tools/rebuild_zebra.pl
يَعمَلُ: تحديثات فهارس زيبرا مع البيانات التي تم تغيرها مؤخراً.
المطلوبة من قبل: زيبرا
إقتراح التردد: كل X دقيقة ، (بين 5-15 دقيقة) اعتمادا على احتياجات أدائها
الإعارة
حجوزات في قائمة الانتظار
Script path: misc/cronjobs/holds/build_holds_queue.pl
يَعمَلُ: تحديثات تقرير الحجوزات في قائمة الأنتظار
Required by: Holds Queue Report
اقتراح التردد: كل 1-4 ساعة
وصف:
السكربت الذي يجب تنفيذ النظام بشكل دوري أذا مكتبة النظام تسمح للمستعيرين بوضعة على رف الحجوزات. هذا السكربت يقرر ماإذا كانت المكتبة يجب أن تكون مسؤولة عن تحقيق طلب حجز معين.
It's behavior is controlled by the system preferences StaticHoldsQueueWeight and RandomizeHoldsQueueWeight.
If you do not want all of your libraries to participate in the on-shelf holds fulfillment process, you should list the the libraries that *do* participate in the process here by inputting all the participating library's branchcodes, separated by commas ( e.g. "MPL,CPL,SPL,BML" etc. ).
By default, the holds queue will be generated such that the system will first attempt to hold fulfillment using items already at the pickup library if possible. If there are no items available at the pickup library to fill a hold, build_holds_queue.pl will then use the list of libraries defined in StaticHoldsQueueWeight. If RandomizeHoldsQueueWeight is disabled ( which it is by default ), the script will assign fulfillment requests in the order the branches are placed in the StaticHoldsQueueWeight system preference.
على سبيل المثال نظامك يتكون من ثلاث مكتبات، باحجام مختلفة (صغيرة ،
إذا ما أردتَ أن تقوم بنشر عبء الحجوزات بالتساوي في نظام مكتبتك. ببساطة مكِّن التفضيل RandomizeHoldsQueueWeight . فعندما يكون هذا التفضيل ممكَّناً، فإن الترتيب الذي سيطلب من المكتبات إنجازحجز لمواد على الرف سيكون عشوائياً في كل مرة يتم إعادة توليد القائمة.
Leaving StaticHoldsQueueWeight empty is contraindicated at this time. Doing so will cause the build_holds_queue script to ignore RandomizeHoldsQueueWeight, causing the script to request hold fulfillment not randomly, but by alphabetical order.
الحجوزات المنتهية
Script path: misc/cronjobs/holds/cancel_expired_holds.pl
Does: By default, this cron job will only automatically cancel holds where the user has set an expiration date. If the library is using the ExpireReservesMaxPickUpDelay and ExpireReservesMaxPickUpDelayCharge preferences then this script will also cancel holds that have been sitting on the hold shelf for too long and will (if the library does) charge the patron for not picking up the hold.
إقتراح التردد : يومياً
إلغاء تعليق الحجوزات
Script path: misc/cronjobs/holds/auto_unsuspend_holds.pl
Does: This script checks to find holds that should no longer be suspended and removes the suspension if the AutoResumeSuspendedHolds preference is set to 'allow'. This puts the patron back in to the queue where they were when the hold was suspended.
إقتراح التردد : يومياً
غرامات
مسار السكربت: misc/cronjobs/fines.pl
Does: Calculates and posts fines to patron accounts.
Required by: finesMode system preference
إقتراح التردد: ليلاً
Static Fines
Script path: misc/cronjobs/staticfines.pl
Does: this script calculates and charges overdue fines to patron accounts
Note If the Koha System Preference 'finesMode' is set to 'production', the fines are charged to the patron accounts. If set to 'test', the fines are calculated but not applied.
Note Fines won't be applied on a holiday.
المستحقات الكثيرة
مسار السكربت: misc/cronjobs/longoverdue.pl
يَفعل: يسمح لواحد بتحديد التأخير من تغيير المواد المختلفة لحالات الفقدان, و إختيار الرسوم لهذه المستخدمة في سعر إستبدال القائمه لسجل المادة.
إقتراح التردد: ليلاً
Note
Staff can control some of the parameters for the longoverdue cron job with the DefaultLongOverdueLostValue and DefaultLongOverdueChargeValue preferences.
Track Total Checkouts
Script path: misc/cronjobs/update_totalissues.pl
Does: updates the biblioitems.totalissues field in the database with the latest tally of checkouts based on historical issue statistics.
إقتراح التردد: ليلاً
Warning
If the time on your database server does not match the time on your Koha server you will need to take that into account, and probably use the --since argument instead of the --interval argument for incremental updating.
Note
This cronjob can be used if there is a performance concern. Otherwise, use the UpdateTotalIssuesOnCirc System Preference.
Generate Patron File for Offline Circulation
Script path: misc/cronjobs/create_koc_db.pl
Does: Generates the borrowers.db file for use with the Koha Offline Circulation tool
إقتراح التردد : يومياً
Automatic renewal
Script path: misc/cronjobs/automatic_renewals.pl
Does: Will automatically renew items if you're allowing automatic renewal with your circulation and fine rules.
إقتراح التردد: ليلاً
مستخدمين
Batch Delete Patrons
Script path: misc/cronjobs/delete_patrons.pl
Does: Deletes patron records in batch based on date not borrowed since, expired before, last seen, category code, or library branch.
أوتار ذات قوس غير محددة
Script path: misc/cronjobs/delete_expired_opac_registrations.pl
Does: Deletes patron registrations that were submitted via the OPAC but not reviewed by the library within the number of days entered in the PatronSelfRegistrationExpireTemporaryAccountsDelay preference.
إقتراح التردد: ليلاً
Unconfirmed Registrations
Script path: misc/cronjobs/delete_unverified_opac_registrations.pl
Does: Deletes patron self registrations that were submitted via the OPAC but not confirmed via email within 24 hours. This is only necessary if you are requiring patrons to confirm their registrations via email with the PatronSelfRegistrationVerifyByEmail preference.
إقتراح التردد: كل ساعة
AnonymousPatron
Script path: misc/cronjobs/batch_anonymise.pl
Does: Used to anonymize patron data. This will remove borrowernumbers from circulation history so that the stats are kept, but the patron information is removed for privacy reasons.
Update Child to Adult Patron Type
مسار السكربت: misc/cronjobs/fines.pl
Does: Convert juvenile/child patrons from juvenile patron category and category code to corresponding adult patron category and category code when they reach the upper age limit defined in the Patron Categories.
إقتراح التردد: ليلاً
DESCRIPTION
This script is designed to update patrons from juvenile to adult patron types, remove the guarantor, and update their category codes appropriately when they reach the upper age limit defined in the Patron Categories.
USAGE EXAMPLES
"juv2adult.pl"
"juv2adult.pl" -b=<branchcode> -f=<categorycode> -t=<categorycode> (Processes a single branch, and updates the patron categories from category to category)
"juv2adult.pl" -f=<categorycode> -t=<categorycode> -v -n (Processes all branches, shows all messages, and reports the patrons who would be affected. Takes no action on the database)
الإخطارات
رسالة قائمة الانتظار
Script path: misc/cronjobs/process_message_queue.pl
Does: processes the message queue to send the check out, check in and hold filled emails and SMS message to users and sends outgoing emails to patrons. requires EnhancedMessagingPreferences to be on
اقتراح التردد: كل 1-4 ساعة
Important
Item due and Advanced due notices are controlled by the advance_notices cron.
الإشعارات المتقدمة
Script path: misc/cronjobs/advance_notices.pl
Does: prepares "pre-due" notices and "item due" notices for patrons who request them prepares notices for patrons for items just due or coming due soon. requires EnhancedMessagingPreferences to be on
إقتراح التردد: ليلاً
Note
This script does not actually send the notices. It queues them in the message queue for later
الإشعارات المتأخرة
Script path: misc/cronjobs/overdue_notices.pl
يَفعلُ: يحضر الرسائل لتنبيه المستفيدين بخصوص الرسائل المتأخرة (كلاهما عبر البريد الألكتروني و الطباعة)
إقتراح التردد: ليلاً
Note
This script does not actually send the notices. It queues them in the message queue for later or generates the HTML for later printing
See also
The misc/cronjobs/advance_notices.pl program allows you to send messages to patrons in advance of their items becoming due, or to alert them of items that have just become due.
Print Overdues
Script path: misc/cronjobs/printoverdues.sh
Does: generates PDF files from HTML files in directories and prints them
طباعة إشعارات الحجز
Script path: misc/cronjobs/gather_print_notices.pl
يَفعلُ: يبدوا من خلال قائمة الإنتظار لإشعارات الحجز التي لم ترسل من خلالها بسبب المستفيد لايملك عنوان بريد الكتروني و يوليد إشعار الطباعة
إقتراح التردد: ليلاً
تقنية التحدث الى
لمعرفة المزيد حول عرض منتج الطرف الثالث للتحدث بالتقنية الملحقة.
إرسال إشعارات الملف
Script path: misc/cronjobs/thirdparty/TalkingTech_itiva_outbound.pl
يَفعلُ: سكربت توليد مواصفات سي لملف الإشعارات الصادرة لتقنية التحدث i-tiva لنظام إشعارات الهاتف.
Required by: TalkingTechItivaPhoneNotification
إقتراح التردد: ليلاً
إستلام إشعارات الملف
Script path: misc/cronjobs/thirdparty/TalkingTech_itiva_inbound.pl
يَفعلُ: سكربت معالجة ملفات النتائج المستلمة لتقنية التحدث i-tiva لنظام إشعارات الهاتف.
Required by: TalkingTechItivaPhoneNotification
إقتراح التردد: ليلاً
Notify Patrons of Expiration
Script path: misc/cronjobs/membership_expiry.pl
Does: Sends messages to warn patrons of their card expiration to the messaage queue cron.
Requires: MembershipExpiryDaysNotice
Frequency: nightly
في المعالجة / سلة الكتب
Script path: misc/cronjobs/cart_to_shelf.pl
يَعمَلُ: تحديثات كل المواد مع موقع السلة الى موقع الموادة الدائم.
Required by: NewItemsDefaultLocation, InProcessingToShelvingCart, & ReturnToShelvingCart system preferences
إقتراح التردد: كل ساعة
الفهرس
Import Webservice Batch
Script path: misc/cronjobs/import_webservice_batch.pl
Does: A cron job for processing import bach queues of type 'webservice'. Batches can also be processed through the UI.
Note
This script is used for OCLC Connexion
Connexion Import Daemon
Script path: misc/bin/connexion_import_daemon.pl
Does: A daemon that listens for OCLC Connexion requests and is compliant with OCLC Gateway specification. It takes requests with MARC XML and import batch parameters from a configuration file and forwards it to svc/import_bib
Note
This script is used for OCLC Connexion
Batch Item Deletion
Script path: misc/cronjobs/delete_items.pl
Does: A batch item deletion tool, which generates a query against the items database and deletes the items matching the criteria specified in the command line arguments.
Check URL Quick
Script path: misc/cronjobs/check-url-quick.pl
Does: Check URLs from biblio records.
Note
This script replaces the check-url.pl script
تأكيد عنوان URLs
مسار السكربت: misc/cronjobs/check-url.pl
يَعمَلُ: تأكيد العنوان في حقل 856$u.السكربت يمكن الآن إخراجه ويتم تهيئته في CSV أو HTML. إصدار روابط الــ HTML مباشرة الى محرر تسجيلة مارك الببليوغرافية.
إقتراح التردد: كل شهر
Learn more: http://wiki.koha-community.org/wiki/Check-url_enhancements
Delete Records via Leader
Script path: misc/cronjobs/delete_records_via_leader.pl
Does: Attempt to delete any MARC records where the leader character 5 equals 'd'
تحرير الاستنادات
Script path: misc/cronjobs/merge_authorities.pl
المطلوب: ___ التغييرات على السجلات الإستنادية.
Note
The name of this script is misleading. This script does not merge authorities together it instead merges authority data with linked bib records. Edits to authority records will be applied to bibliographic records that use that authority when this script is run.
المطلوب من قبل: dontmerge تفضيلات النظام
إقتراح التردد: ليلاً
تحديث الدوريات
مسار السكربت: misc/cronjobs/serialsUpdate.pl
يَعمَلُ: التأكد منإذا كان هناك منشورات"متأخرة" على الإشتراكات الفعالة, و إذا كان هناك, السكربت سوف يتم تعيينه في وقت متأخر, وتضيف التالية كما هو متوقع.
إقتراح التردد: ليلاً
Automatic item update
Script path: misc/cronjobs/automatic_item_modification_by_age.pl
Does: updates items based on the list of rules set forth in the Automatic item modifications by age tool
Required by: Automatic item modifications by age
Frequency suggestions: nightly
أوباك
تغذية الـ RSS
مسار السكربت: misc/cronjobs/rss/rss.pl
Does: Produces an RSS XML document for any SQL query (not used for search results RSS feed). Learn more.
إقتراح التردد: كل ساعة
صلاحيات المستعير
Script path: misc/cronjobs/build_browser_and_cloud.pl
يَعمَلُ: إنشاء المحتوى لإستعراض المؤلفين في الأوباك
Required by: OpacBrowser system preference
Important
هذا التفضيل ينطبق فقط على الأنظمة الفرنسية في هذا الوقت.
الموضوع / مؤلف السحب
مسار السكربت: misc/cronjobs/cloud-kw.pl
يَعمَلُ: يولد الـHTML لسحب الكلمات من مفهرس نظام كوها زيبرا.misc/cronjobs/cloud-sample.conf وهو يملك عينة من كيفية عمل هذا السكربت.
التردد: وهذا هو النوع من السكربت يمكنك من التنفيذ مرة واحدة في كل شهر أو نحو ذلك، وتوليد المحتويات لن تتغير كثيرا مع مرور الوقت.
نظام الإدارة
Services Throttle
Script path: misc/cronjobs/services_throttle.pl
Does: resets the xISBN services throttle
إقتراح التردد: ليلاً
تنظيف قاعدة البيانات
Script path: misc/cronjobs/cleanup_database.pl
Does: Truncates the sessions table, cleans out old zebraqueue entries, action logs and staged MARC files.
التزويد
تنظيف الإقتراحات القديمة
Script path: misc/cronjobs/purge_suggestions.pl
يَعمَلُ: إزالة الإقتراحات القديمة (التي يحددها لك) من اقتراح مجال الإدارة.
Email suggestions to process
Script path: misc/cronjobs/notice_unprocessed_suggestions.pl
Does: Generates a notice to the fund owner that there are suggestions in need of processing
EDI Message Processing
Script path: misc/cronjobs/edi_cron.pl
Does: Sends and received EDI messages
Frequency: Every 15 minutes
Remove Temporary EDI Files
Script path: misc/cronjobs/remove_temporary_edifiles.pl
Does: removes temporary EDI files that are older than 5 days
Reports
Run Report
Script path: misc/cronjobs/runreport.pl
Does: run pre-existing saved reports
Norwegian patron database
NL sync to Koha
Script path: misc/cronjobs/nl-sync-to-koha.pl
Does: sync patrons from the Norwegian national patron database (NL) to Koha
Note Relies on NorwegianPatronDBUsername and NorwegianPatronDBPassword system preferences
NL sync from Koha
Script path: misc/cronjobs/nl-sync-from-koha.pl
Does: sync patrons from Koha to the Norwegian national patron database (NL)
Note Relies on NorwegianPatronDBUsername and NorwegianPatronDBPassword system preferences
تطوير السكربت
هذه لا ينبغي أن تنفذ بدون تعديل:
Script path: misc/cronjobs/update_items.pl
مسار السكربت:misc/cronjobs/smsoverdues.pl
مسار السكربت:misc/cronjobs/notifyMailsOp.pl
مسارالسكربت:misc/cronjobs/reservefix.pl
Script path:misc/cronjobs/zebraqueue_start.pl
Social data
Get report social data
Script path: misc/cronjobs/social_data/get_report_social_data.pl
Does: downloads data from Babelthèque to add to OPAC records
إقتراح التردد: ليلاً
Update social data
Script path: misc/cronjobs/social_data/update_social_data.pl
Does: updates OPAC records with Babelthèque social data