What is a Processing Job?
A Job is the processing of data to complete a particular function. Within BLOX CMS, Jobs runs behind-the-scenes and can carry out such tasks as building Classified assets based on PDFs or images that have been placed within an FTP directory.
Jobs may be created and saved only by qualified TownNews staff members. New importers should instead be setup directly in the target application's settings where available.
How to Add a Job
Within the Manage jobs panel, select +New to populate the Editing New Job panel. This consists of 4 tabs: Jobs, Source, Destination and Filters.
Jobs
Job has three properties.
1 Job ID - Leave the Job ID field blank. The system will automatically generate the ID once the job has been saved.
2 Job title - The name of the job.
3 Run automatically - Check this box if you want the job to run automatically, which is approximately every hour. Uncheck this box if you want to manually push the job to run.
Source
Source has three properties.
1 Module - The module that needs to run. The current modules available at this time are: ap_tncms, atom, rss, csv, tncms_media, nitf_media, nitf_tncms, tncms_classifieds, tncms_display_ads.
2 Location - The FTP location where the files will be uploaded or leave blank if using the feed_url option listed below. Values in the location field are limited to 100 characters.
3 Options - The options the user wants these records to have. Currently the following options are supported:
- ap_webfeeds - This is part of the AP Web Feed Manager which has a parser that looks for additional AP Fields, including the Slug, Sections (AP Categories), Print Headline, Print Subheadline, and the style format to toggle between AP and Agate. Set the value to 1. This also works with the 'download_images' option (see below).
- AP Image Assets (including Child Assets of Articles) import with a Slug. The Slug is related to how AP names the Image. Therefore, AP Web-Feed Manager (WFM) is being removed. Sites that have not updated their AP Channel(s) will not work. Any site affected by this will need to remove their existing AP Feed and setup a new one.
- check_source_first - Can only be used with a text-based file. Consider enabling this if your feed has multiple elements, like an XML file with related image files that are referred to in the XML file. With this option enabled, the feed will not be processed until the text file is present.
- dealer_id - Use this when setting up an AutoFeed.
- default_category - This will set a default category for Ads to be associated with (ie: vehicle/car).
- download_images - This brings in the web-res version of Children Images that AP associates with articles. Set the value to 1.
- feed - This is used for AutoFeeds Classifieds Ads. The value will be who ever the autofeed provider is.
- feed_url - If the location is longer than 100 characters you can use this property to put in a longer URL. You will need to leave the location field empty.
- force_parse - This is used for parsing autofeed information Classifieds Ads. Value of 1 = True and 0 = False.
- force_source - Will process feed files, regardless if they have been processed already. Normally, feed files will not be re-processed on the same day. Set to 1 to enable.
- full_article - Set to 1 to pull in the full article. Set to 0 for just the headline and first paragraph. The full article will only be pulled in if the feed includes it.
- id_mode - When this value is set to 'filename', the job will compare existing files in BLOX to items in the feed, and not upload existing content based on filename. This option is useful with source module tncms_display_ads, where it will prevent duplicate PDFs from being re-imported.
- link_vehicle - This enables/disables a Buy URL Link to a Vehicle Ad. It is only available for LotLinx autofeed provider. Value of 1 = True/Enable and 0 = False/Disable.
- persistent_previews - Enables previews to be syndicated along with assets when used with the tncms_json source module. Set value to '1' to enable.
- proximity - This is used in conjunction with the 'zip code' option. Set the Value to a numeric value indicating how many miles from the center of a zipcode to search for Vehicle Ads to be pulled in from the defined radius. This only works for AutoFeeds.
- separator: Can be used with parsers that rely on line endings to separate entries, such as 'tncms_csv'. This option is helpful if feed files are created with Apple OS X, where the line endings are encoded differently than other operating systems. Set to 'CR' for files generated on a Mac.
- source_asis - This will need to be set to 1 if the feed isn't coming from the feeds folder.
- zipcode - Used for AutoFeeds and in conjunction with the 'proximity' option. Enter a zipcode as the Value.
Destination
The Destination area also has three properties:
1 Module Area - The module that needs to run. For the majority of the jobs, this will be set to tncms. However, there are some jobs that might require a different module name.
2 Location Area - The FTP location where the files will be uploaded. For the majority of the jobs, this field will be left empty. However, there are some jobs that might require a location.
3 Options Area - The options the user wants these records to have. For example, the tags we want them to have: section or keyword. Currently the following options are supported:
- app - Application used to save the assets created by the parser. If the job is only pulling in editorial assets, this option is not used. This is needed when a job like syndication is set up to work with asset types other than editorial. Examples: editorial, banner ads, business.
- default_category - Typically only used when the destination module is set to tncms_classifieds; will assign ads to the specified BLOX Classifieds category.
- deletetime - When the asset should be deleted from the system. Example: "+14 days" (will delete the asset after 14 days. This is important as the site hosting the article may very well remove it after a set time period thus your link would be dead.) Best practice would be to set this to "+1 hour" and set the schedule for the feed to run every hour. Then if the "update_mode" is set to "replace" if the site hosting the article still has it when the feed runs it will update the delete time so it's an hour away again.
- delete_children - Turned off by default. If turned on children will be deleted. Set to 1 to turn on.
- expire_on_import - Performs a comparison with the last known processed file and sets any current asset to deleted status if the same asset is not in the current feed file, but was in the last known file. Typically only used when the destination module is set to tncms_classifieds. Set to 1 to turn on.
- flags - sets all the imported assets to have a flag. Example: top_story
- inherit_keywords - This is on by default, all children will inherit the parent keywords. Set to 0 to turn off
- inherit_sections - This is on by default, all children will inherit the parent sections. Set to 0 to turn off
- market - Strictly used with the tncms_classifieds destination module. Sets the market that ads will be imported into. If not specified, assets will be imported to a market named 'default'. The value used for market can be a comma-delimited list of multiple market names. Markets are created in the BLOX Classifieds application settings.
- map - Use this option to map Classified Ads to a specific URL/Section on your site.
- override:category - This allows a default category to be assigned to every file processed. Typically only used when the destination module is set to tncms_classifieds. Set to 0 to turn off.
- override:priority - This allows a default priority to be assigned to every file processed.
- parse_fields - This is on by default, automatically extracts field data from adtext. Typically only used when the destination module is set to tncms_classifieds. Set to 0 to turn off.
- poll_enabled - Set to True. This is used for Poll Assets on BLOX Total CMS to be ported over to BloxCMS.
- property_import - Sets all imported assets to have a specific import property. Example: property_import='archives' This is useful for troubleshooting purposes. For example, if you had property_import='archives' set in the Editorial > Assets area you can search for property_import: archives to return all assets that were imported via that processing job.
- property_import_author - Sets all imported assets to have a specific property. Example 2: property_import_author='jdoe'.
- property_no_comments - If set to 1 it will set all imported assets to disallow user commenting.
- property_no_publish - If set to 1 it will set all imported asset to do not publish status.
- property_presentation - Sets all of the images imported to a specific presentation mode. The following are possible values for property_presentation: cutout, mugshot, panorama, masthead, zoom, showcase, infographic.
- property_custom_note - Sets all imported assets to have the custom property of note. Example: property_custom_note='Live Coverage!' sets a custom property on all imported assets with a name of "note" and value of "Live Coverage!"
- related_content_style - Sets all imported assets to a valid content style that is set up in the admin of your site. Example: pull_quote
- service_name - This will be used if the process job is a CSV file loaded into the subscription services
- source_encoding - Set to 'macintosh' if original file was created using Apple OS X. Only works with 'tncms_classifieds' module
- starttime - sets the 'Start Date' or 'Start date/time' field on most assets. Similar to 'deletetime', this option takes values similar to "+1 day", "+1 week", "+1 month" to force a specific start time.
- strip_zeros - If set to 1, this will remove leading zeros from the classification codes of feed files. Category codes require an exact match to import correctly. Used with classified feeds if a feed file includes categories with leading zeros, but the categories in BLOX Classifieds do not include leading zeros.
- suggest_category - This option will suggest a category for your Classified Ads. Value = 1 is True/Enabled or 0 = False/Disable.
- tag_geo - Sets all imported assets to have a specific geo location tag. Example: Moline
- tag_keyword - Sets all imported assets to have a specific keyword tag. Example: townnews-test
- tag_section - Sets all imported assets to have a specific section tag. Example: news/local
- tag_site - Sets all imported assets to have a specific site tag. Example: siteA
- tag_update_mode - If set to 'update' tags will be added to existing assets rather than replace the current tags. Existing tags will not be replaced
- unset_deletedate - If set to 1, this will set the delete date to null. This will also remove delete date/times for previously imported assets, if the same asset is re-imported.
- update_mode - Options are 'replace' and 'ignore'. replace - normal behavior, replace anything that already exists. ignore - skip existing assets, content will not be updated, relations and tags will.
- use_site_timezone - If set to 1, this will use the site's time zone to convert start and archive times to the sites timezone before converting to UTC
- vehicle_title - Setting the value to 1 = True/Show Title or 0 = False/Hide Title. This option is used for AutoFeeds.
- wait_threshold - The time in minutes that a job will pause to check if files are still being uploaded. This can cause delays in jobs being processed, but exists to also help prevent jobs from running prematurely, before all files are present that may be necessary for a successful import.
- workflow - This will be used to assign a workflow to incoming assets, this must match that of an already existing workflow
- workflow_process - This is used in conjunction with the workflow option and will assign the asset to the specific workflow process. This must match that of a workflow process defined within the workflow given above.
Filters
Filters is used most often to assign items to a particular section. To add a new filter, select Add. To remove a filter, select Remove.
All of the properties listed above in the Destination options can be used here. Regular Expression is the value that will be coming in from the feed. Replacement Value is the value that you want to reassign to those assets.
You will want to use the destination option or the filter option for a specific property. If you set up both, the value set in the destination tab will win.
Multiple Replacement values may be listed by placing commas between each value.
Select Save to finalize the job.
How to Run a Job
Jobs run automatically but they can be processed manually. Within the Manage jobs panel and select Run job to initiate the job. It will run within 5-10 minutes. Multiple jobs can also be selected by holding down either Shift or CTRL and then choosing the Run job option.
Jobs may be Enabled/Disabled, Edited or removed by utilizing either toolbar option.