Environment: Liferay 6.1
In my liferay-portlet.xml I have this cron job:
<scheduler-entry>
<scheduler-event-listener-class>com.shorex.b2b.web.billing.IndexJob</scheduler-event-listener-class>
<trigger>
<cron>
<cron-trigger-value>0 0 6 1/1 * ? *</cron-trigger-value>
</cron>
</trigger>
</scheduler-entry>
This expresion "0 0 6 1/1 * ? *" means that there is a process which will be execute once every day at 6:00:00.
The problem is that this process is been executed since 6:00:00 every 10 seconds. that is, at 6:00:00, 6:00:10, 6:00:20, 6:00:30...
Could anyone tell me why is it happening?
<cron-trigger-value>0 0 6 ? * *</cron-trigger-value>
thats every day at 6.
Related
I've just moved servers and have overlap on crontabs running.
Both servers set to BST, but one sends me a log at
08:00 BST the other old one 09:00 BST
The crontab entry for both is
0 9 * * * /root/phpmaillog.sh > /dev/null 2>&1
Mystery?
I'm trying to get a Techwell TW6869 driver to work. This PCIe-chip is able to capture analog video signals. Therefore I'm using a driver which can be found here: GitHub
The chip is connected to a Freescale imx.6 processor which is running Angström distribution. The driver already worked on the target but I didn't use it for some time and somehow it doesn't do it's job anymore.
So what I did, was implementing kernel messages in the beginning of each function so I know what does happen exactly. Finally I found out, that no PCIe Interrupt is generated anymore. Though the interrupt is registered which I found out here:
root#freescaleimx6:~# cat /proc/interrupts | grep tw6869
155: 0 0 0 0 GIC tw6869
Running something on the videodevice unfortunately does not generate an interrupt.
root#freescaleimx6:~# gst-launch-1.0 v4l2src device=/dev/video2 ! imxipuvideosink
Setting pipeline to PAUSED ...
Pipeline is live and does not need PREROLL ...
Setting pipeline to PLAYING ...
New clock: GstSystemClock
^Chandling interrupt.
Interrupt: Stopping pipeline ...
Execution ended after 0:00:08.992961001
Setting pipeline to PAUSED ...
Setting pipeline to READY ...
Setting pipeline to NULL ...
Freeing pipeline ...
root#freescaleimx6:~#
This could also possibly help (does it?)
root#freescaleimx6:~# cat /proc/bus/pci/devices
0000 16c3abcd 180 1000000 0 0 0 0 0 1200000 100000 0 0 0 0 0 10000 pcieport
0100 17976869 9b 1100008 0 0 0 0 0 0 1000 0 0 0 0 0 0 tw6869
Does anyone have an idea?
What is the difference between two commands, pls help to explain it.
ps -ef|sort +6|tail
oracle 55676 1 0 03:06:16 - 0:36 oracleprod (LOCAL=NO)
oracle 24876 1 0 02:52:56 - 0:40 oracleprod (LOCAL=NO)
oracle 41616 1 0 07:00:59 - 0:44 oracleprod (LOCAL=NO)
oracle 43460 1 0 02:45:05 - 0:53 oracleprod (LOCAL=NO)
oracle 25754 1 0 08:10:03 - 1:01 oracleprod (LOCAL=NO)
ps -ef|sort +5|tail
root 5440 2094 0 Nov 21 - 0:47 /usr/sbin/syslogd
root 9244 1 0 Nov 21 - 3:26 ./pcimapsvr.ip -D0
root 10782 1 0 Nov 21 - 4:41 ./pciconsvr.ip -D0
Why do both commands show different processes ? And if I keep on changing the value of 'sort +3' or reduce, the processes keeps on changing. What exactly is command all about ? Please help to explain.
You are sorting the wrong columns using both an obsolete syntax and a wrong method. No surprise random processes show up.
You'll get the top consumers that way:
ps -ef | sort -n -k8 | tail
-n means sort numerically
-k8 means sort the the eight column (cumulative execution time)
In my /etc/crontab file I write:
* * * * * PLACK_ENV=development -I /home/adrian/app/lib/ /home/adrian/app/script/db/log_to_db.pl
To make a cron job run every minute. The job is running the log_to_db.pl perl script, which inserts data to my database.
When I run in my terminal
PLACK_ENV=development -I /home/adrian/app/lib/ /home/adrian/app/script/db/log_to_db.pl
It's OK! The script runs.
But the cron job isn't working!
What can be wrong?
PD: My script starts like
#!/usr/bin perl
....
My cron log prints:
Jul 8 20:29:01 dev0001 crond[1829]: (*system*) RELOAD (/etc/crontab)
Jul 8 20:29:01 dev0001 crond[1829]: (CRON) bad username (/etc/crontab)
Jul 8 20:30:01 dev0001 crond[1829]: (*system*) RELOAD (/etc/crontab)
Jul 8 20:30:01 dev0001 crond[1829]: (CRON) bad username (/etc/crontab)
Jul 8 20:30:01 dev0001 CROND[13504]: (root) CMD (/usr/lib64/sa/sa1 -S DISK 1 1)
You need a username when putting it in the system crontab
* * * * * adrian PLACK_ENV=development -I /home/adrian/app/lib/ /home/adrian/app/script/db/log_to_db.pl
But as #jithin said, putting this in your user crontab (crontab -e) might make more sense.
Don't edit the crontab file directly. Instead use crontab -e and add the cron entry.
With reference to the link
I wan't to change the repeat time from one task from 5 minutes to 1 minute. The task is there:
Folder: \
HostName: ZSERVER
TaskName: \Check_IIS_Server
Next Run Time: 04.10.2012 16:30:45
Status: Ready
Logon Mode: Interactive/Background
Last Run Time: 04.10.2012 16:25:45
Last Result: 0
Author: WACKER\createuser
Task To Run: powershell.exe powershell.exe -Noninteract
ive -Command "&{C:\Logfiles_Poly\Check_IIS_Server.ps1}"
Start In: N/A
Comment: N/A
Scheduled Task State: Enabled
Idle Time: Disabled
Power Management: Stop On Battery Mode, No Start On Batteries
Run As User: WACKER\Adminuser
Delete Task If Not Rescheduled: Enabled
Stop Task If Runs X Hours and X Mins: 01:00:00
Schedule: Scheduling data is not available in this format.
Schedule Type: Daily
Start Time: N/A
Start Date: N/A
End Date: N/A
Days: Every 1 day(s)
Months: N/A
Repeat: Every: 0 Hour(s), 5 Minute(s)
Repeat: Until: Time: None
Repeat: Until: Duration: 24 Hour(s), 0 Minute(s)
Repeat: Stop If Still Running: Disabled
Now my change command is, i wan't to edit the repeat time to one minute:
C:\Users\username>schtasks /change /tn "Check_IIS_Server_Poly" /ri 1
ERROR: The parameter is incorrect.
Why did I can't edit this job over command?
Thanks,
Horst
You need to provide full path to the task, in your case it'll be \Check_IIS_Server. I don't see anything else that could be wrong here.
I create a task (schtasks /change /mo 1 /tn "Test") with repeat time one minute and edit the other settings manuell.
Horst