Schedule JasperServer Repository Export

Schedule JasperServer Repository Export

Export of JasperServer Repository :

  1. Access the server where jasperserver is installed. It can be on your local machine as well as on remote server. If the jasperserver is installed in local machine then run command in command prompt. Else connect to the remote server through putty and run commands.
  2. Jasperserver provide us with the import-export utility by using which export of any kind of data on server can be taken.
  3. The import and export utilities are shell scripts located in the:

<js-install>/buildomatic  folder.

  • Windows: <js-install>\buildomatic\js-import.bat
  • Linux: <js-install>/buildomatic/


More information about jasper utility and the command can be found at “”

  1. JasperReports server should be stopped when using the import and export utilities. This is very important for the import utility to avoid issues with caches, configuration, and security.
  1. Go the path <js-install>/buildomatic and Run the command :

Unix:  –uris /public/ Reports –output-zip E:\document \


js-export.bat  –everything –output-zip E:\document \

  1. After complete execution of above command you’ll be able to get the required export in the given directory with the given output file name.
  2. Next task is to create the script which we can run on server. Here is an example of shell script which can be run on unix server.
  3. In this script following variables are declared:

# Path to buildomatic directory of Jasperserver that contains the js-export script: JASPER_BUILDPATH=/opt/jasperreports-server-6.3.0-bin/buildomatic/

# URI of Jasper repository folder to be dumped:


# Destination directory for backup files:


# Destination output file name for backup file:


# export of the jasper repository

DATETIME=date +%Y%m%d%H%M%S

Next ,

cd ${JASPER_BUILDPATH} has been used to go to the js-install path.

Where the export command can be run.

./ –uris ${REPO_REPPATH} –repository-permissions –output-zip ${DUMP_DIR}${OUTPUT}_${DATETIME}.zip

In this,

if [ $? -eq 0 ]; then

echo “Backup is taken Successfully. Backup File – ${DUMP_DIR}${OUTPUT}_${DATETIME}.zip”


echo “Backup Failed. Please check the above log for any errors.”


We are writing in the log file on the successful/unsuccessful completion of the backup.


We can run this script on server with command “sh”.

Schedule Export of JasperServer Repository :

  1. Crontab syntax :
    A crontab file has five fields for specifying day , date and time followed by the command to be run at that interval. bn
  2. Type in ‘Crontab -e’ in server, following screen will appear:


Nano editor will open

Type in there:

/5  * * * /home/server/JasperBackup/ >> /home/jasper/JasperBackup/log.txt 2>&1

Here we are scheduling the execution of “” file in every 5 minutes. You can schedule as per the requirement.

Thank You

Nisha Sahu




For those embedded systems that can’t be constantly watched by a human, watchdog timers may be the solution.

The watchdog timer is an important device in the embedded system , which is used to develop reliable products. Most of the embedded systems need to be self-reliant in order to restart and restore the system if any software bug disturbs the system. It is not always possible for human operators to wait for rebooting the system for every software problem. The watchdog timer is a piece of hardware that provides ultimate solutions for the real-time industries, which used to detect system abnormalities automatically and to reset the processor.




Watchdog Timers(WDT)

A watchdog timer is a piece of hardware that can be used to automatically detect software anomalies and reset the processor if any occur. Generally speaking, a watchdog timer is based on a counter that counts down from some initial value to zero. The embedded software selects the counter’s initial value and periodically restarts it. If the counter ever reaches zero before the software restarts it, the software is presumed to be malfunctioning and the processor’s reset signal is asserted. The processor (and the embedded software it’s running) will be restarted as if a human operator had cycled the power.

Figure 1 shows a typical arrangement. As shown, the watchdog timer is a chip external to the processor. However, it could also be included within the same chip as the CPU. This is done in many micro-controllers. In either case, the output from the watchdog timer is tied directly to the processor’s reset signal.


kicking the dog

The process of restarting the watchdog timer’s counter is sometimes called “kicking the dog.” The appropriate visual metaphor is that of a man being attacked by a vicious dog. If he keeps kicking the dog, it can’t ever bite him. But he must keep kicking the dog at regular intervals to avoid a bite. Similarly, the software must restart the watchdog timer at a regular rate, or risk being restarted.

Advantage of Watchdog Timers:

  • Resets automatically without human intervention.

  • Detects the errors in the program and reboot the system

  • Cost sensitive

  • Saves the time and money

  • No need to place the employers to monitor the software debugs.

  • Increases the system performance.


A number of considerations must go into any design that uses a watchdog as a monitor. Once the timeout period is determined, the system software must be analyzed to determine where to locate the watchdog restart instructions. For an effective design, the number of watchdog restarts should be kept to a minimum, and some consideration should be given to the likelihood of incorrectly executing a restart. As mentioned previously, some system software is too convoluted or data-dependent to ensure that all software flow paths are covered by a watchdog restart. This may dictate that a self-diagnostic software approach might be required. If there is an expected failure mechanism such as a periodic EMI burst or power supply glitch, the watchdog timeout should consider this period.



Pushpraj Kumar 🙂



timestamp is a sequence of characters or encoded information identifying when a certain event occurred, usually giving date and time of day, sometimes accurate to a small fraction of a second.

A timestamp is the current time of an event that is recorded by a computer. Through mechanisms such as the Network Time Protocol ( NTP ), a computer maintains accurate current time, calibrated to minute fractions of a second. Such precision makes it possible for networked computers and applications to communicate effectively.

How to Get timestamp in UNIX

Command         : –       date +%s

Result         : –        1405407447

How to convert timestamp into Date – time in UNIX

Command         : –    date -d @1405407447 +’%Y-%m-%d %H:%M:%S’

Result         : –                2014-07-15 01:57:27

How to set system Date Time in UNIX

Command       : –     date -s “11/20/2003 12:48:00”

Set the system date and time to November 20, 2003, 12:48 PM

How to get  GMT time Information  in UNIX

GMT time according to selected country..

Command  : –    TZ=’America/Los_Angeles’ date

Result         : –        Tue Jul 15 00:28:10 PDT 2014

Command  : –    TZ=’India’ date

Result         : –      Tue Jul 15 07:32:40 India 2014

How to convert Date into Unix timestamp

To convert Date time in to specific Timestamp

Method: 1

Command       : –    date -d “2010-10-02 17:56:56” “+%s”

Result               : –        1286060216

Method: 2

Command       : –   date –date=’06/12/2012 07:21:22′ +”%s”

Result               : –        1339503682

How to add and subtract Date

To add some days in specific Date

Command       : –    date -d ‘Jan 1 1982 + 11 days’

Result               : –     Tue Jan 12 00:00:00 EST 1982   

To add some Days and get the output in timestamp

Command       : –    date -d ‘Jan 1 1982 + 11 days’ +%s

Result              : –          379659600

To subtract some days in specific Date

Command       : –    date -d ‘Jan 1 1982 – 1 days’  

Result              : –    Thu Dec 31 00:00:00 EST 1981

 ****Pushpraj Kumar*****