top button
Flag Notify
    Connect to us
      Site Registration

Site Registration

cron vs. whenjobs vs. goaljobs in Linux

+1 vote
698 views

I'm interested in a replacement for cron which would allow me to run various cron jobs on demand, and mark them as having been run, so they won't be run again from the schedule.

I noticed whenjobs, which looks like it may do the job. The documentation for whenjobs says that it is obsolete and has been replaced by goaljobs.

Has anyone tried out whenjobs or goaljobs.

posted Dec 17, 2013 by Luv Kumar

Share this question
Facebook Share Button Twitter Share Button LinkedIn Share Button

1 Answer

+1 vote

Two key advantages of Whenjobs over cron are a simpler syntax for writing rules and a powerful dependency system that lets one job depend on variables set when other jobs run (allowing, for example, one job to run only when another job has finished successfully).

Instead you must use this style:

whenjobs --set variable=value

You may need quoting if the value contains a space. If you are using the optional --type parameter, put it before the variable=value declaration.

answer Jan 12, 2014 by Amit Kumar Pandey
Similar Questions
+1 vote

I'm trying to figure out a way to insert a timestamp into a log file I'm creating for a cron job:

/usr/bin/rsync -v --min-size=1 -rlpgo -O --inplace /home/myuser/Get*
root@xx.x.xx.xx:/mnt/yyy/zzz/compass 2>&1 >& /tmp/rsync_user.log

I've googled this but all I could find are tips on how to add the time and date to the name of the log file itself, not to the contents of the log.

Any tips or pointers would be great.

+1 vote

Do you need cron installed for the files in /etc/cron.daily/ to execute?

Did a Centos 6.x minimal openvz install and noticed cron is not installed by default and after installing mlocate cant help but wander if it will be updated without it.

...